diff options
author | Wim <wim@42.be> | 2019-03-20 22:52:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-20 22:52:23 +0100 |
commit | a27600046e86a32ea769d6bf8a32fb9c6aa630b9 (patch) | |
tree | 59a128d7d634b6a1fb2227cd8a57cfcf464efdc5 /bridge | |
parent | fb2667631da8c0a2849fbfa595a99090b0acc9ed (diff) | |
download | matterbridge-msglm-a27600046e86a32ea769d6bf8a32fb9c6aa630b9.tar.gz matterbridge-msglm-a27600046e86a32ea769d6bf8a32fb9c6aa630b9.tar.bz2 matterbridge-msglm-a27600046e86a32ea769d6bf8a32fb9c6aa630b9.zip |
Fix regression for legacy slack by #766 (#768)
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/slack/legacy.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bridge/slack/legacy.go b/bridge/slack/legacy.go index be372edd..0c9f5ba4 100644 --- a/bridge/slack/legacy.go +++ b/bridge/slack/legacy.go @@ -55,14 +55,18 @@ func (b *BLegacy) Connect() error { }) if b.GetString(tokenConfig) != "" { 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() go b.rtm.ManageConnection() go b.handleSlack() } } else if b.GetString(tokenConfig) != "" { 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() go b.rtm.ManageConnection() go b.handleSlack() |