Note Edited notification type
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -133,6 +133,9 @@ globalThis.addEventListener('notificationclick', (ev: ServiceWorkerGlobalScopeEv
|
||||
case 'showFollowRequests':
|
||||
client = await swos.openClient('push', '/my/follow-requests', loginId);
|
||||
break;
|
||||
case 'edited':
|
||||
if ('note' in data.body) client = await swos.openPost({ reply: data.body.note }, loginId);
|
||||
break;
|
||||
default:
|
||||
switch (data.body.type) {
|
||||
case 'receiveFollowRequest':
|
||||
|
||||
Reference in New Issue
Block a user