diff options
author | Wim <wim@42.be> | 2017-01-28 00:36:53 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-01-28 00:36:53 +0100 |
commit | 53e9664cded31df5454d4e79d66607ba9db841c5 (patch) | |
tree | 69a7dcf3cbb8631b96917d9fcc725cf311683c30 | |
parent | 482fbac68fde1674577f2ef722773de64416e2d8 (diff) | |
download | matterbridge-msglm-53e9664cded31df5454d4e79d66607ba9db841c5.tar.gz matterbridge-msglm-53e9664cded31df5454d4e79d66607ba9db841c5.tar.bz2 matterbridge-msglm-53e9664cded31df5454d4e79d66607ba9db841c5.zip |
Add support for private channels (slack). Closes #118
-rw-r--r-- | bridge/slack/slack.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index c3d3d927..6432ecc1 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -204,6 +204,14 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) { b.channels = ev.Info.Channels b.si = ev.Info b.Users, _ = b.sc.GetUsers() + // add private channels + groups, _ := b.sc.GetGroups(true) + for _, g := range groups { + channel := new(slack.Channel) + channel.ID = g.ID + channel.Name = g.Name + b.channels = append(b.channels, *channel) + } case *slack.InvalidAuthEvent: flog.Fatalf("Invalid Token %#v", ev) default: |