upd: add notification for when scheduled note gets posted

This commit is contained in:
Marie 2024-11-04 11:22:37 +01:00
parent e62c78073a
commit de9fbd32cd
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
13 changed files with 77 additions and 9 deletions

View file

@ -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;
}