mirror of
https://git.boykissers.com/pawkey/pawkey-sk.git
synced 2025-12-20 12:14:18 +00:00
fix(sw): type error in sw (#15844)
This commit is contained in:
@@ -271,7 +271,7 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
|
|||||||
case 'newChatMessage':
|
case 'newChatMessage':
|
||||||
if (data.body.toRoom != null) {
|
if (data.body.toRoom != null) {
|
||||||
return [`${data.body.toRoom.name}: ${getUserName(data.body.fromUser)}: ${data.body.text}`, {
|
return [`${data.body.toRoom.name}: ${getUserName(data.body.fromUser)}: ${data.body.text}`, {
|
||||||
icon: data.body.fromUser.avatarUrl,
|
icon: data.body.fromUser.avatarUrl ?? undefined,
|
||||||
badge: iconUrl('messages'),
|
badge: iconUrl('messages'),
|
||||||
tag: `chat:room:${data.body.toRoomId}`,
|
tag: `chat:room:${data.body.toRoomId}`,
|
||||||
data,
|
data,
|
||||||
@@ -279,7 +279,7 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
|
|||||||
}];
|
}];
|
||||||
} else {
|
} else {
|
||||||
return [`${getUserName(data.body.fromUser)}: ${data.body.text}`, {
|
return [`${getUserName(data.body.fromUser)}: ${data.body.text}`, {
|
||||||
icon: data.body.fromUser.avatarUrl,
|
icon: data.body.fromUser.avatarUrl ?? undefined,
|
||||||
badge: iconUrl('messages'),
|
badge: iconUrl('messages'),
|
||||||
tag: `chat:user:${data.body.fromUserId}`,
|
tag: `chat:user:${data.body.fromUserId}`,
|
||||||
data,
|
data,
|
||||||
|
|||||||
Reference in New Issue
Block a user