summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-03-05 20:56:33 +0100
committerWim <wim@42.be>2018-03-05 20:56:33 +0100
commitab94b5ca7af0b5b4ca9bebfa16f80f93a5d6c76c (patch)
treec75a31b3fbd71419f453731a18437b9381063e62
parent8d2ce56c37f3634c185327cd73d360fd02cd13d7 (diff)
downloadmatterbridge-msglm-ab94b5ca7af0b5b4ca9bebfa16f80f93a5d6c76c.tar.gz
matterbridge-msglm-ab94b5ca7af0b5b4ca9bebfa16f80f93a5d6c76c.tar.bz2
matterbridge-msglm-ab94b5ca7af0b5b4ca9bebfa16f80f93a5d6c76c.zip
Update regex for usergroup matching. Closes #379
-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 4d128415..a42c7e78 100644
--- a/bridge/slack/slack.go
+++ b/bridge/slack/slack.go
@@ -368,7 +368,7 @@ func (b *Bslack) replaceChannel(text string) string {
// @see https://api.slack.com/docs/message-formatting#variables
func (b *Bslack) replaceVariable(text string) string {
- results := regexp.MustCompile(`<!((?:subteam\^)?[a-zA-Z0-9]+)(?:\|(.+?))?>`).FindAllStringSubmatch(text, -1)
+ results := regexp.MustCompile(`<!((?:subteam\^)?[a-zA-Z0-9]+)(?:\|@?(.+?))?>`).FindAllStringSubmatch(text, -1)
for _, r := range results {
if r[2] != "" {
text = strings.Replace(text, r[0], "@"+r[2], -1)