Do not join Slack channel without API access (slack) (#563)

This commit is contained in:
Duco van Amstel 2018-11-07 16:25:00 +00:00 committed by Wim
parent a20b7895a9
commit a1bf37e457
1 changed files with 5 additions and 0 deletions

View File

@ -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)