Use RTM only on API (slack). Fix #56

This commit is contained in:
Wim 2016-10-25 23:29:32 +02:00
parent b7c918a195
commit e7107cf782
1 changed files with 2 additions and 2 deletions

View File

@ -56,10 +56,10 @@ func (b *Bslack) Connect() error {
matterhook.Config{BindAddress: b.Config.BindAddress})
} else {
b.sc = slack.New(b.Config.Token)
b.rtm = b.sc.NewRTM()
go b.rtm.ManageConnection()
}
flog.Info("Connection succeeded")
b.rtm = b.sc.NewRTM()
go b.rtm.ManageConnection()
go b.handleSlack()
return nil
}