fix: heart reaction

This commit is contained in:
ThatOneCalculator 2023-01-19 16:17:20 -08:00
parent e00af483b1
commit 9a2c05ef83
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
1 changed files with 3 additions and 3 deletions

View File

@ -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+-]+)(?:@\.)?:$/);