1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-23 22:56:53 +09:00
This commit is contained in:
NoriDev 2024-06-04 16:02:17 +09:00
parent b84bda3963
commit 86312de015

View File

@ -144,6 +144,7 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
case 'reaction': {
let reaction = data.body.reaction;
let badge: string | undefined;
const reaction1 = data.body.reaction;
if (reaction.startsWith(':')) {
// カスタム絵文字の場合
@ -164,7 +165,7 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
const tag = `reaction:${data.body.note.id}`;
return [t('_notification.youGotReact', { name: getUserName(data.body.user) }), {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
body: (reaction.startsWith(':') ? `:${ reaction }:` : `${ reaction }`) + '\n' + data.body.note.text ?? '',
body: (reaction1.startsWith(':') ? `:${ reaction }:` : `${ reaction }`) + '\n' + data.body.note.text ?? '',
icon: data.body.user.avatarUrl,
tag,
badge,