teach ReactionService about non-ASCII emoji names

This commit is contained in:
dakkar 2024-04-23 14:42:02 +01:00
parent b6f41a28ed
commit 0f3764ff71

View file

@ -64,8 +64,8 @@ type DecodedReaction = {
host?: string | null; host?: string | null;
}; };
const isCustomEmojiRegexp = /^:([\w+-]+)(?:@\.)?:$/; const isCustomEmojiRegexp = /^:([\p{Letter}\p{Number}\p{Mark}_+-]+)(?:@\.)?:$/;
const decodeCustomEmojiRegexp = /^:([\w+-]+)(?:@([\w.-]+))?:$/; const decodeCustomEmojiRegexp = /^:([\p{Letter}\p{Number}\p{Mark}_+-]+)(?:@([\w.-]+))?:$/;
@Injectable() @Injectable()
export class ReactionService { export class ReactionService {