mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-15 08:29:25 +01:00
Update userlist on join (slack). Closes #372
This commit is contained in:
parent
c5ecd09172
commit
cce7624ab8
@ -7,8 +7,8 @@ import (
|
|||||||
"github.com/42wim/matterbridge/bridge/config"
|
"github.com/42wim/matterbridge/bridge/config"
|
||||||
"github.com/42wim/matterbridge/bridge/helper"
|
"github.com/42wim/matterbridge/bridge/helper"
|
||||||
"github.com/42wim/matterbridge/matterhook"
|
"github.com/42wim/matterbridge/matterhook"
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"github.com/nlopes/slack"
|
"github.com/nlopes/slack"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
"html"
|
"html"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -342,6 +342,10 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
|
|||||||
}
|
}
|
||||||
switch ev := msg.Data.(type) {
|
switch ev := msg.Data.(type) {
|
||||||
case *slack.MessageEvent:
|
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" {
|
if ev.SubType == "pinned_item" || ev.SubType == "unpinned_item" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user