merge upstream again

This commit is contained in:
Hazelnoot 2025-04-24 14:23:45 -04:00
commit a4dd19fdd4
167 changed files with 6779 additions and 3952 deletions

View file

@ -291,6 +291,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 ?? undefined,
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 ?? undefined,
badge: iconUrl('messages'),
tag: `chat:user:${data.body.fromUserId}`,
data,
renotify: true,
}];
}
default:
return null;
}