fix(EmojiRegex): longer ids (#1274)

Fix EmojiRegex to accept emojis with ids up to 20 characters long
This commit is contained in:
Fedor Lapshin 2022-11-08 23:30:53 +03:00 committed by GitHub
parent f36b5430a8
commit fb0566fac2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -508,7 +508,7 @@ type Emoji struct {
// EmojiRegex is the regex used to find and identify emojis in messages
var (
EmojiRegex = regexp.MustCompile(`<(a|):[A-z0-9_~]+:[0-9]{18}>`)
EmojiRegex = regexp.MustCompile(`<(a|):[A-z0-9_~]+:[0-9]{18,20}>`)
)
// MessageFormat returns a correctly formatted Emoji for use in Message content and embeds