mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-14 19:15:52 +02:00
@@ -268,6 +268,24 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
|
||||
data,
|
||||
renotify: true,
|
||||
}];
|
||||
case 'newChatMessage':
|
||||
if (data.body.toRoom != null) {
|
||||
return [`${data.body.toRoom.name}: ${getUserName(data.body.fromUser)}: ${data.body.text}`, {
|
||||
icon: data.body.fromUser.avatarUrl,
|
||||
badge: iconUrl('messages'),
|
||||
tag: `chat:room:${data.body.toRoomId}`,
|
||||
data,
|
||||
renotify: true,
|
||||
}];
|
||||
} else {
|
||||
return [`${getUserName(data.body.fromUser)}: ${data.body.text}`, {
|
||||
icon: data.body.fromUser.avatarUrl,
|
||||
badge: iconUrl('messages'),
|
||||
tag: `chat:user:${data.body.fromUserId}`,
|
||||
data,
|
||||
renotify: true,
|
||||
}];
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user