Update userMentionRE to play nice with punctuation. #7

Closed
di-gital wants to merge 1 commits from di-gital/matterbridge:disc-mention-fix into updatexmppp

View File

@ -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(`<a?(:\w+:)\d+>`)
)