summaryrefslogtreecommitdiffstats
path: root/bridge/slack/slack.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-08-12 14:51:41 +0200
committerWim <wim@42.be>2017-08-12 14:51:41 +0200
commit28710d0bc7d5bd564d702953c490a865b0cc438d (patch)
treed025fe274779881442a1cf14d62ec2d42671cc3c /bridge/slack/slack.go
parentad4d461606b5fb9b64377c8ef37110ee0b3c721b (diff)
downloadmatterbridge-msglm-28710d0bc7d5bd564d702953c490a865b0cc438d.tar.gz
matterbridge-msglm-28710d0bc7d5bd564d702953c490a865b0cc438d.tar.bz2
matterbridge-msglm-28710d0bc7d5bd564d702953c490a865b0cc438d.zip
Allow a webhookurl per channel (discord). #239
Diffstat (limited to 'bridge/slack/slack.go')
-rw-r--r--bridge/slack/slack.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go
index 4c72a90c..f16aa055 100644
--- a/bridge/slack/slack.go
+++ b/bridge/slack/slack.go
@@ -108,14 +108,14 @@ func (b *Bslack) Disconnect() error {
}
-func (b *Bslack) JoinChannel(channel string) error {
+func (b *Bslack) JoinChannel(channel config.ChannelInfo) error {
// we can only join channels using the API
if b.Config.WebhookURL == "" && b.Config.WebhookBindAddress == "" {
if strings.HasPrefix(b.Config.Token, "xoxb") {
// TODO check if bot has already joined channel
return nil
}
- _, err := b.sc.JoinChannel(channel)
+ _, err := b.sc.JoinChannel(channel.Name)
if err != nil {
if err.Error() != "name_taken" {
return err