mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-26 00:51:36 +00:00
parent
fb2667631d
commit
a27600046e
@ -55,14 +55,18 @@ func (b *BLegacy) Connect() error {
|
|||||||
})
|
})
|
||||||
if b.GetString(tokenConfig) != "" {
|
if b.GetString(tokenConfig) != "" {
|
||||||
b.Log.Info("Connecting using token (receiving)")
|
b.Log.Info("Connecting using token (receiving)")
|
||||||
b.sc = slack.New(b.GetString(tokenConfig))
|
b.sc = slack.New(b.GetString(tokenConfig), slack.OptionDebug(b.GetBool("debug")))
|
||||||
|
b.channels = newChannelManager(b.Log, b.sc)
|
||||||
|
b.users = newUserManager(b.Log, b.sc)
|
||||||
b.rtm = b.sc.NewRTM()
|
b.rtm = b.sc.NewRTM()
|
||||||
go b.rtm.ManageConnection()
|
go b.rtm.ManageConnection()
|
||||||
go b.handleSlack()
|
go b.handleSlack()
|
||||||
}
|
}
|
||||||
} else if b.GetString(tokenConfig) != "" {
|
} else if b.GetString(tokenConfig) != "" {
|
||||||
b.Log.Info("Connecting using token (sending and receiving)")
|
b.Log.Info("Connecting using token (sending and receiving)")
|
||||||
b.sc = slack.New(b.GetString(tokenConfig))
|
b.sc = slack.New(b.GetString(tokenConfig), slack.OptionDebug(b.GetBool("debug")))
|
||||||
|
b.channels = newChannelManager(b.Log, b.sc)
|
||||||
|
b.users = newUserManager(b.Log, b.sc)
|
||||||
b.rtm = b.sc.NewRTM()
|
b.rtm = b.sc.NewRTM()
|
||||||
go b.rtm.ManageConnection()
|
go b.rtm.ManageConnection()
|
||||||
go b.handleSlack()
|
go b.handleSlack()
|
||||||
|
Loading…
Reference in New Issue
Block a user