summaryrefslogtreecommitdiff
path: root/packages/sw/src/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sw/src/scripts')
-rw-r--r--packages/sw/src/scripts/create-notification.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/sw/src/scripts/create-notification.ts b/packages/sw/src/scripts/create-notification.ts
index 7ec575721d..65e84e4609 100644
--- a/packages/sw/src/scripts/create-notification.ts
+++ b/packages/sw/src/scripts/create-notification.ts
@@ -264,6 +264,21 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
data,
}];
+ case 'scheduledNoteFailed':
+ return [i18n.ts._notification.scheduledNoteFailed, {
+ body: data.body.reason,
+ badge: iconUrl('bell'),
+ data,
+ }];
+
+ case 'scheduledNotePosted':
+ return [i18n.ts._notification.scheduledNotePosted, {
+ body: data.body.note.text ?? '',
+ icon: data.body.user.avatarUrl ?? undefined,
+ badge: iconUrl('bell'),
+ data,
+ }];
+
default:
return null;
}