summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/ReactionService.ts
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-05-02 21:06:10 +0000
committerdakkar <dakkar@thenautilus.net>2024-05-02 21:06:10 +0000
commitd0a2708f912b1ceaa0f40161d874fb5c72a72f4e (patch)
tree650324da99261d7910504dfbcaa0683c5b2121dc /packages/backend/src/core/ReactionService.ts
parentmerge: save and restore UI language together with other prefs - fixes #443 (!... (diff)
parentteach ReactionService about non-ASCII emoji names (diff)
downloadsharkey-d0a2708f912b1ceaa0f40161d874fb5c72a72f4e.tar.gz
sharkey-d0a2708f912b1ceaa0f40161d874fb5c72a72f4e.tar.bz2
sharkey-d0a2708f912b1ceaa0f40161d874fb5c72a72f4e.zip
merge: handle non-ASCII emoji names (!464)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/464 Approved-by: Leah <kevinlukej@gmail.com> Approved-by: Ember <acomputerdog@gmail.com> Approved-by: Marie <marie@kaifa.ch>
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 {