Add support for private channels (slack). Closes #118

This commit is contained in:
Wim 2017-01-28 00:36:53 +01:00
parent 482fbac68f
commit 53e9664cde

View File

@ -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: