summaryrefslogtreecommitdiff
path: root/packages/sw/src/scripts
diff options
context:
space:
mode:
authorMarie <marie@kaifa.ch>2024-02-20 15:10:41 +0000
committerAmelia Yukii <amelia.yukii@shourai.de>2024-02-20 15:10:41 +0000
commit4a13508da0a5d930b4d73bb4208df39a578e7796 (patch)
tree4043fefdc93e3c66159d6a6ac565591fa25642ce /packages/sw/src/scripts
parentmerge: Warn when missing alt text (!423) (diff)
downloadsharkey-4a13508da0a5d930b4d73bb4208df39a578e7796.tar.gz
sharkey-4a13508da0a5d930b4d73bb4208df39a578e7796.tar.bz2
sharkey-4a13508da0a5d930b4d73bb4208df39a578e7796.zip
Note Edited notification type
Diffstat (limited to 'packages/sw/src/scripts')
-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 3e2fb16ec0..32b12f4b4f 100644
--- a/packages/sw/src/scripts/create-notification.ts
+++ b/packages/sw/src/scripts/create-notification.ts
@@ -232,6 +232,14 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
data,
}];
+ case 'edited':
+ return [t('_notification.edited', { name: getUserName(data.body.user) }), {
+ body: data.body.note.text ?? '',
+ icon: data.body.user.avatarUrl,
+ badge: iconUrl('messages'),
+ data,
+ }];
+
default:
return null;
}