enhance: Push notification of Antenna note (#9338)

* wip

* wip

* wip

* fix

* fix

* 🎨
This commit is contained in:
tamaina 2022-12-18 19:50:02 +09:00 committed by GitHub
parent c5179e8f1c
commit 867e31c9ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 104 additions and 24 deletions

View file

@ -252,6 +252,15 @@ async function composeNotification<K extends keyof pushNotificationDataMap>(data
data,
renotify: true,
}];
case 'unreadAntennaNote':
return [t('_notification.unreadAntennaNote', { name: data.body.antenna.name }), {
body: `${getUserName(data.body.note.user)}: ${data.body.note.text || ''}`,
icon: data.body.note.user.avatarUrl,
badge: iconUrl('satellite'),
tag: `antenna:${data.body.antenna.id}`,
data,
renotify: true,
}];
default:
return null;
}