wip
This commit is contained in:
@@ -64,9 +64,9 @@ export class SendNotificationUseCase implements AsyncUseCase<SendNotificationCom
|
||||
title: command.title,
|
||||
body: command.body,
|
||||
channel: 'in_app',
|
||||
data: command.data,
|
||||
actionUrl: command.actionUrl,
|
||||
status: 'dismissed', // Auto-dismiss since user doesn't want these
|
||||
...(command.data ? { data: command.data } : {}),
|
||||
...(command.actionUrl ? { actionUrl: command.actionUrl } : {}),
|
||||
});
|
||||
|
||||
await this.notificationRepository.create(notification);
|
||||
@@ -102,11 +102,13 @@ export class SendNotificationUseCase implements AsyncUseCase<SendNotificationCom
|
||||
title: command.title,
|
||||
body: command.body,
|
||||
channel,
|
||||
urgency: command.urgency,
|
||||
data: command.data,
|
||||
actionUrl: command.actionUrl,
|
||||
actions: command.actions,
|
||||
requiresResponse: command.requiresResponse,
|
||||
...(command.urgency ? { urgency: command.urgency } : {}),
|
||||
...(command.data ? { data: command.data } : {}),
|
||||
...(command.actionUrl ? { actionUrl: command.actionUrl } : {}),
|
||||
...(command.actions ? { actions: command.actions } : {}),
|
||||
...(command.requiresResponse !== undefined
|
||||
? { requiresResponse: command.requiresResponse }
|
||||
: {}),
|
||||
});
|
||||
|
||||
// Save to repository (in_app channel) or attempt delivery (external channels)
|
||||
|
||||
Reference in New Issue
Block a user