summaryrefslogtreecommitdiffstats
path: root/bridge/slack
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/slack')
-rw-r--r--bridge/slack/slack.go10
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
}