summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-03-27 20:15:05 +0200
committerWim <wim@42.be>2017-03-27 20:15:05 +0200
commitf935c573e9f69a6f77ab12c8b4551667dcc20fd4 (patch)
tree54f84f5eda9f961c3ffcc27bab89ee6a5d11e734
parent4a25e66c00397941fd9d2af02076e5eb8b143006 (diff)
downloadmatterbridge-msglm-f935c573e9f69a6f77ab12c8b4551667dcc20fd4.tar.gz
matterbridge-msglm-f935c573e9f69a6f77ab12c8b4551667dcc20fd4.tar.bz2
matterbridge-msglm-f935c573e9f69a6f77ab12c8b4551667dcc20fd4.zip
Allow bot tokens for now without warning (slack). Closes #140
-rw-r--r--bridge/slack/slack.go4
1 files changed, 4 insertions, 0 deletions
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