enhance: Push notification of Antenna note (#9338)
* wip
* wip
* wip
* fix
* fix
* 🎨
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -27,6 +27,11 @@ export function openNote(noteId: string, loginId: string) {
|
||||
return openClient('push', `/notes/${noteId}`, loginId, { noteId });
|
||||
}
|
||||
|
||||
// noteIdからノートを開く
|
||||
export function openAntenna(antennaId: string, loginId: string) {
|
||||
return openClient('push', `/timeline/antenna/${antennaId}`, loginId, { antennaId });
|
||||
}
|
||||
|
||||
export async function openChat(body: any, loginId: string) {
|
||||
if (body.groupId === null) {
|
||||
return openClient('push', `/my/messaging/${getAcct(body.user)}`, loginId, { body });
|
||||
|
Reference in New Issue
Block a user