summaryrefslogtreecommitdiffstats
path: root/bridge/slack
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/slack')
-rw-r--r--bridge/slack/slack.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go
index d2d118b2..924f4131 100644
--- a/bridge/slack/slack.go
+++ b/bridge/slack/slack.go
@@ -147,6 +147,11 @@ func (b *Bslack) Disconnect() error {
// allow apps or bots to join channels themselves and they need to be invited
// manually by a user.
func (b *Bslack) JoinChannel(channel config.ChannelInfo) error {
+ // We can only join a channel through the Slack API.
+ if b.sc == nil {
+ return nil
+ }
+
b.populateChannels()
channelInfo, err := b.getChannel(channel.Name)