summaryrefslogtreecommitdiffstats
path: root/bridge/slack
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-02-22 23:36:22 +0100
committerWim <wim@42.be>2018-02-22 23:36:22 +0100
commitcce7624ab8e8e2b91e9854516715a0ddc22dca6a (patch)
tree3adda78cd6ee64d7e2e6fb60b14404240ce0b351 /bridge/slack
parentc5ecd091729930e7c2e0c37472cd7738e1c2c495 (diff)
downloadmatterbridge-msglm-cce7624ab8e8e2b91e9854516715a0ddc22dca6a.tar.gz
matterbridge-msglm-cce7624ab8e8e2b91e9854516715a0ddc22dca6a.tar.bz2
matterbridge-msglm-cce7624ab8e8e2b91e9854516715a0ddc22dca6a.zip
Update userlist on join (slack). Closes #372
Diffstat (limited to 'bridge/slack')
-rw-r--r--bridge/slack/slack.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go
index 80886446..b7c80bf4 100644
--- a/bridge/slack/slack.go
+++ b/bridge/slack/slack.go
@@ -7,8 +7,8 @@ import (
"github.com/42wim/matterbridge/bridge/config"
"github.com/42wim/matterbridge/bridge/helper"
"github.com/42wim/matterbridge/matterhook"
- log "github.com/sirupsen/logrus"
"github.com/nlopes/slack"
+ log "github.com/sirupsen/logrus"
"html"
"io"
"net/http"
@@ -342,6 +342,10 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
}
switch ev := msg.Data.(type) {
case *slack.MessageEvent:
+ // update the userlist on a channel_join
+ if message.Raw.SubType == "channel_join" {
+ b.Users, _ = b.sc.GetUsers()
+ }
if ev.SubType == "pinned_item" || ev.SubType == "unpinned_item" {
continue
}