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
|
// Convert old heart to new
|
||||||
if (reaction === "♥️") return "❤️";
|
if (reaction === "♥️") return "❤️";
|
||||||
|
|
||||||
|
// Allow unicode reactions
|
||||||
|
const match = emojiRegex.exec(reaction);
|
||||||
|
if (match) {
|
||||||
|
const unicode = match[0];
|
||||||
|
return unicode;
|
||||||
|
}
|
||||||
|
|
||||||
const custom = reaction.match(/^:([\w+-]+)(?:@\.)?:$/);
|
const custom = reaction.match(/^:([\w+-]+)(?:@\.)?:$/);
|
||||||
if (custom) {
|
if (custom) {
|
||||||
const name = custom[1];
|
const name = custom[1];
|
||||||
|
|
Loading…
Reference in a new issue