From 1d3c8253981fba2d431df2f5cc12dd78b21d37bc Mon Sep 17 00:00:00 2001 From: Marie Date: Mon, 4 Nov 2024 11:22:37 +0100 Subject: upd: add notification for when scheduled note gets posted --- packages/sw/src/scripts/create-notification.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'packages/sw/src/scripts') diff --git a/packages/sw/src/scripts/create-notification.ts b/packages/sw/src/scripts/create-notification.ts index 8442552e3b..4fda784dba 100644 --- a/packages/sw/src/scripts/create-notification.ts +++ b/packages/sw/src/scripts/create-notification.ts @@ -265,6 +265,14 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif 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; } -- cgit v1.2.3-freya