From 863bb3dc287894c5d15ecc3fabf78f0aea48ab5b Mon Sep 17 00:00:00 2001 From: NoriDev Date: Fri, 22 Dec 2023 14:22:23 +0900 Subject: [PATCH] =?UTF-8?q?enhance(sw):=20=ED=91=B8=EC=8B=9C=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test test test test --- packages/sw/src/scripts/create-notification.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sw/src/scripts/create-notification.ts b/packages/sw/src/scripts/create-notification.ts index 745396d1e3..0dc6b55079 100644 --- a/packages/sw/src/scripts/create-notification.ts +++ b/packages/sw/src/scripts/create-notification.ts @@ -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, @@ -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}`,