From e7107cf782d64b63fe5d1fc1440754cbfee5c55e Mon Sep 17 00:00:00 2001 From: Wim Date: Tue, 25 Oct 2016 23:29:32 +0200 Subject: [PATCH] Use RTM only on API (slack). Fix #56 --- bridge/slack/slack.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 62cb04b7..5c28172c 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -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 }