From 045cb2058cde1cbedeb5c1f0889f1d83ca024213 Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Tue, 29 May 2018 16:49:10 -0400 Subject: [PATCH] Fix regexp in replaceMention (slack). (#435) --- bridge/slack/slack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 87601424..1fcfa32a 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -357,7 +357,7 @@ func (b *Bslack) userGroupName(id string) string { // @see https://api.slack.com/docs/message-formatting#linking_to_channels_and_users func (b *Bslack) replaceMention(text string) string { - results := regexp.MustCompile(`<@([a-zA-z0-9]+)>`).FindAllStringSubmatch(text, -1) + results := regexp.MustCompile(`<@([a-zA-Z0-9]+)>`).FindAllStringSubmatch(text, -1) for _, r := range results { text = strings.Replace(text, "<@"+r[1]+">", "@"+b.userName(r[1]), -1) }