mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
fix: heart reaction
This commit is contained in:
parent
33f7e093e9
commit
be05847383
@ -64,11 +64,11 @@ export async function toDbReaction(
|
|||||||
// 文字列タイプのリアクションを絵文字に変換
|
// 文字列タイプのリアクションを絵文字に変換
|
||||||
if (Object.keys(legacies).includes(reaction)) return legacies[reaction];
|
if (Object.keys(legacies).includes(reaction)) return legacies[reaction];
|
||||||
|
|
||||||
// Unicode emoji
|
// Unicode絵文字
|
||||||
const match = emojiRegex.exec(reaction);
|
const match = emojiRegex.exec(reaction);
|
||||||
if (match) {
|
if (match) {
|
||||||
//return only first emoji
|
const unicode = match[0];
|
||||||
return match[0];
|
return unicode.match('\u200d') ? unicode : unicode.replace(/\ufe0f/g, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
const custom = reaction.match(/^:([\w+-]+)(?:@\.)?:$/);
|
const custom = reaction.match(/^:([\w+-]+)(?:@\.)?:$/);
|
||||||
|
Loading…
Reference in New Issue
Block a user