summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Connolly <patrick.c.connolly@gmail.com>2018-05-29 16:49:10 -0400
committerWim <wim@42.be>2018-05-29 22:49:10 +0200
commit045cb2058cde1cbedeb5c1f0889f1d83ca024213 (patch)
treedbd06fac277cff087383335ec8a3a5721a74e112
parentd03afc12fd755b5263ce6a74ffa90e5a3afcad5e (diff)
downloadmatterbridge-msglm-045cb2058cde1cbedeb5c1f0889f1d83ca024213.tar.gz
matterbridge-msglm-045cb2058cde1cbedeb5c1f0889f1d83ca024213.tar.bz2
matterbridge-msglm-045cb2058cde1cbedeb5c1f0889f1d83ca024213.zip
Fix regexp in replaceMention (slack). (#435)
-rw-r--r--bridge/slack/slack.go2
1 files changed, 1 insertions, 1 deletions
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)
}