diff options
| author | Marie <github@yuugi.dev> | 2024-11-04 11:22:37 +0100 |
|---|---|---|
| committer | Marie <github@yuugi.dev> | 2024-12-09 05:33:19 +0100 |
| commit | 1d3c8253981fba2d431df2f5cc12dd78b21d37bc (patch) | |
| tree | 263d59f8f07b27d4d6192c2273eca3195e5e8bc1 /packages/sw | |
| parent | chore: remove from note required type (diff) | |
| download | sharkey-1d3c8253981fba2d431df2f5cc12dd78b21d37bc.tar.gz sharkey-1d3c8253981fba2d431df2f5cc12dd78b21d37bc.tar.bz2 sharkey-1d3c8253981fba2d431df2f5cc12dd78b21d37bc.zip | |
upd: add notification for when scheduled note gets posted
Diffstat (limited to 'packages/sw')
| -rw-r--r-- | packages/sw/src/scripts/create-notification.ts | 8 |
1 files changed, 8 insertions, 0 deletions
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; } |