From 9a2c05ef83f1eaccb42ab4dd594e22df9eacf81d Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Thu, 19 Jan 2023 16:17:20 -0800 Subject: [PATCH] fix: heart reaction --- packages/backend/src/misc/reaction-lib.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/misc/reaction-lib.ts b/packages/backend/src/misc/reaction-lib.ts index a2497a25e6..5fe404b880 100644 --- a/packages/backend/src/misc/reaction-lib.ts +++ b/packages/backend/src/misc/reaction-lib.ts @@ -64,11 +64,11 @@ export async function toDbReaction( // 文字列タイプのリアクションを絵文字に変換 if (Object.keys(legacies).includes(reaction)) return legacies[reaction]; - // Unicode emoji + // Unicode絵文字 const match = emojiRegex.exec(reaction); if (match) { - //return only first emoji - return match[0]; + const unicode = match[0]; + return unicode.match('\u200d') ? unicode : unicode.replace(/\ufe0f/g, ''); } const custom = reaction.match(/^:([\w+-]+)(?:@\.)?:$/);