mirror of
https://example.com
synced 2024-11-23 23:46:39 +09:00
fix: reactions using unicode weren't processed
This commit is contained in:
parent
f5f7493135
commit
9ca850be06
1 changed files with 7 additions and 0 deletions
|
@ -72,6 +72,13 @@ export async function toDbReaction(
|
|||
// Convert old heart to new
|
||||
if (reaction === "♥️") return "❤️";
|
||||
|
||||
// Allow unicode reactions
|
||||
const match = emojiRegex.exec(reaction);
|
||||
if (match) {
|
||||
const unicode = match[0];
|
||||
return unicode;
|
||||
}
|
||||
|
||||
const custom = reaction.match(/^:([\w+-]+)(?:@\.)?:$/);
|
||||
if (custom) {
|
||||
const name = custom[1];
|
||||
|
|
Loading…
Reference in a new issue