From 53e9664cded31df5454d4e79d66607ba9db841c5 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 28 Jan 2017 00:36:53 +0100 Subject: Add support for private channels (slack). Closes #118 --- bridge/slack/slack.go | 8 ++++++++ 1 file changed, 8 insertions(+) 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: -- cgit v1.2.3