From f935c573e9f69a6f77ab12c8b4551667dcc20fd4 Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 27 Mar 2017 20:15:05 +0200 Subject: Allow bot tokens for now without warning (slack). Closes #140 --- bridge/slack/slack.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 7d8c7812..5de6cf9b 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -73,6 +73,10 @@ func (b *Bslack) Disconnect() error { func (b *Bslack) JoinChannel(channel string) error { // we can only join channels using the API if b.Config.UseAPI { + if strings.HasPrefix(b.Config.Token, "xoxb") { + // TODO check if bot has already joined channel + return nil + } _, err := b.sc.JoinChannel(channel) if err != nil { return err -- cgit v1.2.3