mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-11-27 14:28:53 +09:00
fix b84bda39
This commit is contained in:
parent
b84bda3963
commit
86312de015
@ -144,6 +144,7 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
|
|||||||
case 'reaction': {
|
case 'reaction': {
|
||||||
let reaction = data.body.reaction;
|
let reaction = data.body.reaction;
|
||||||
let badge: string | undefined;
|
let badge: string | undefined;
|
||||||
|
const reaction1 = data.body.reaction;
|
||||||
|
|
||||||
if (reaction.startsWith(':')) {
|
if (reaction.startsWith(':')) {
|
||||||
// カスタム絵文字の場合
|
// カスタム絵文字の場合
|
||||||
@ -164,7 +165,7 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
|
|||||||
const tag = `reaction:${data.body.note.id}`;
|
const tag = `reaction:${data.body.note.id}`;
|
||||||
return [t('_notification.youGotReact', { name: getUserName(data.body.user) }), {
|
return [t('_notification.youGotReact', { name: getUserName(data.body.user) }), {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
// 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,
|
icon: data.body.user.avatarUrl,
|
||||||
tag,
|
tag,
|
||||||
badge,
|
badge,
|
||||||
|
Loading…
Reference in New Issue
Block a user