Skip to content

Commit

Permalink
enhance(sw): 푸시 알림 개선
Browse files Browse the repository at this point in the history
test

test

test

test
  • Loading branch information
noridev committed Dec 22, 2023
1 parent df37667 commit 863bb3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sw/src/scripts/create-notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
if (!account) return null;
const userDetail = await cli.request('users/show', { userId: data.body.userId }, account.token);
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,
badge: iconUrl('user-plus'),
data,
Expand Down Expand Up @@ -264,7 +264,7 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
}];
}
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,
badge: iconUrl('messages'),
tag: `messaging:group:${data.body.groupId}`,
Expand Down

0 comments on commit 863bb3d

Please sign in to comment.