enhance(sw): 푸시 알림 개선
test test test test
This commit is contained in:
parent
df37667844
commit
863bb3dc28
|
@ -59,7 +59,7 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
|
||||||
if (!account) return null;
|
if (!account) return null;
|
||||||
const userDetail = await cli.request('users/show', { userId: data.body.userId }, account.token);
|
const userDetail = await cli.request('users/show', { userId: data.body.userId }, account.token);
|
||||||
return [t('_notification.youWereFollowed'), {
|
return [t('_notification.youWereFollowed'), {
|
||||||
body: getUserName(data.body.user),
|
body: `${getUserName(data.body.user)} (@${data.body.user?.username}${data.body.user?.host != null ? '@' + data.body.user.host : ''})`,
|
||||||
icon: data.body.user.avatarUrl,
|
icon: data.body.user.avatarUrl,
|
||||||
badge: iconUrl('user-plus'),
|
badge: iconUrl('user-plus'),
|
||||||
data,
|
data,
|
||||||
|
@ -264,7 +264,7 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
return [data.body.group?.name ?? '', {
|
return [data.body.group?.name ?? '', {
|
||||||
body: `${data.body.user?.username}: ${data.body.text ?? ''}`,
|
body: `${getUserName(data.body.user)}: ${data.body.text ?? ''}`,
|
||||||
icon: data.body.user.avatarUrl,
|
icon: data.body.user.avatarUrl,
|
||||||
badge: iconUrl('messages'),
|
badge: iconUrl('messages'),
|
||||||
tag: `messaging:group:${data.body.groupId}`,
|
tag: `messaging:group:${data.body.groupId}`,
|
||||||
|
|
Loading…
Reference in a new issue