From 6474ad4ee2627ca2d915797a2034d86b0bf61135 Mon Sep 17 00:00:00 2001 From: Nicholas DiGirolamo Date: Thu, 27 Feb 2025 16:23:29 -0500 Subject: [PATCH] Update userMentionRE to play nice with punctuation. --- bridge/discord/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/discord/helpers.go b/bridge/discord/helpers.go index 4284bf5e..e5df6173 100644 --- a/bridge/discord/helpers.go +++ b/bridge/discord/helpers.go @@ -160,7 +160,7 @@ func (b *Bdiscord) getCategoryChannelName(name, parentID string) string { var ( // See https://discordapp.com/developers/docs/reference#message-formatting. channelMentionRE = regexp.MustCompile("<#[0-9]+>") - userMentionRE = regexp.MustCompile("@[^@\n]{1,32}") + userMentionRE = regexp.MustCompile("\(*@[^@\n]{1,32}(\,|\:|;\))*") emoteRE = regexp.MustCompile(``) )