summaryrefslogtreecommitdiff
path: root/packages/sw/src/scripts/create-notification.ts
diff options
context:
space:
mode:
authorMarie <github@yuugi.dev>2024-11-04 11:22:37 +0100
committerMarie <github@yuugi.dev>2024-12-09 05:33:19 +0100
commit1d3c8253981fba2d431df2f5cc12dd78b21d37bc (patch)
tree263d59f8f07b27d4d6192c2273eca3195e5e8bc1 /packages/sw/src/scripts/create-notification.ts
parentchore: remove from note required type (diff)
downloadsharkey-1d3c8253981fba2d431df2f5cc12dd78b21d37bc.tar.gz
sharkey-1d3c8253981fba2d431df2f5cc12dd78b21d37bc.tar.bz2
sharkey-1d3c8253981fba2d431df2f5cc12dd78b21d37bc.zip
upd: add notification for when scheduled note gets posted
Diffstat (limited to 'packages/sw/src/scripts/create-notification.ts')
-rw-r--r--packages/sw/src/scripts/create-notification.ts8
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;
}