summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/ReactionService.ts
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-04-23 14:42:02 +0100
committerdakkar <dakkar@thenautilus.net>2024-04-23 14:42:02 +0100
commit0f3764ff716802bbed41cc7c608b669a27030ded (patch)
tree1af44b6c20edfc926d99f1a87047e00e01d1acd5 /packages/backend/src/core/ReactionService.ts
parentpull in sfm-js that supports non-ascii in emoji names (diff)
downloadsharkey-0f3764ff716802bbed41cc7c608b669a27030ded.tar.gz
sharkey-0f3764ff716802bbed41cc7c608b669a27030ded.tar.bz2
sharkey-0f3764ff716802bbed41cc7c608b669a27030ded.zip
teach ReactionService about non-ASCII emoji names
Diffstat (limited to 'packages/backend/src/core/ReactionService.ts')
-rw-r--r--packages/backend/src/core/ReactionService.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/core/ReactionService.ts b/packages/backend/src/core/ReactionService.ts
index 90586b500e..e70d427e98 100644
--- a/packages/backend/src/core/ReactionService.ts
+++ b/packages/backend/src/core/ReactionService.ts
@@ -64,8 +64,8 @@ type DecodedReaction = {
host?: string | null;
};
-const isCustomEmojiRegexp = /^:([\w+-]+)(?:@\.)?:$/;
-const decodeCustomEmojiRegexp = /^:([\w+-]+)(?:@([\w.-]+))?:$/;
+const isCustomEmojiRegexp = /^:([\p{Letter}\p{Number}\p{Mark}_+-]+)(?:@\.)?:$/;
+const decodeCustomEmojiRegexp = /^:([\p{Letter}\p{Number}\p{Mark}_+-]+)(?:@([\w.-]+))?:$/;
@Injectable()
export class ReactionService {