diff options
author | Wim <wim@42.be> | 2016-09-20 12:20:44 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2016-09-20 12:20:44 +0200 |
commit | dce600ad51100d9f9a1cee1d0bda9410f0a2c2a9 (patch) | |
tree | fd7ff3d7fefdc9aa689b3132fc24f76a7331f7df /bridge/slack | |
parent | d02a737e0cf78a30486872f849df7354ec09a6fc (diff) | |
download | matterbridge-msglm-dce600ad51100d9f9a1cee1d0bda9410f0a2c2a9.tar.gz matterbridge-msglm-dce600ad51100d9f9a1cee1d0bda9410f0a2c2a9.tar.bz2 matterbridge-msglm-dce600ad51100d9f9a1cee1d0bda9410f0a2c2a9.zip |
Fix joining slack/mattermost channels using the webhook
Diffstat (limited to 'bridge/slack')
-rw-r--r-- | bridge/slack/slack.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 75429852..79b291b2 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -68,9 +68,13 @@ func (b *Bslack) FullOrigin() string { } func (b *Bslack) JoinChannel(channel string) error { - schannel := b.getChannelByName(channel) - if schannel != nil && !schannel.IsMember { - b.sc.JoinChannel(schannel.ID) + // we can only join channels using the API + if b.Config.UseAPI { + schannel := b.getChannelByName(channel) + if schannel != nil && !schannel.IsMember { + _, err := b.sc.JoinChannel(schannel.ID) + return err + } } return nil } |