diff options
author | Wim <wim@42.be> | 2020-05-14 00:27:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 00:27:34 +0200 |
commit | c9cfa59f5453add42fb3dd9cc29bdc0d692b2077 (patch) | |
tree | 44142c642fa092afd1baadded1c39cbf16b3bc24 /bridge/slack | |
parent | 70622343315f6755987d8cb56fb1b2302d07ce90 (diff) | |
download | matterbridge-msglm-c9cfa59f5453add42fb3dd9cc29bdc0d692b2077.tar.gz matterbridge-msglm-c9cfa59f5453add42fb3dd9cc29bdc0d692b2077.tar.bz2 matterbridge-msglm-c9cfa59f5453add42fb3dd9cc29bdc0d692b2077.zip |
Do not use webhooks when token is configured (slack) (fixes #1123) (#1134)
Diffstat (limited to 'bridge/slack')
-rw-r--r-- | bridge/slack/handlers.go | 2 | ||||
-rw-r--r-- | bridge/slack/slack.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/bridge/slack/handlers.go b/bridge/slack/handlers.go index 56e112d2..d05a358c 100644 --- a/bridge/slack/handlers.go +++ b/bridge/slack/handlers.go @@ -16,7 +16,7 @@ var ErrEventIgnored = errors.New("this event message should ignored") func (b *Bslack) handleSlack() { messages := make(chan *config.Message) - if b.GetString(incomingWebhookConfig) != "" { + if b.GetString(incomingWebhookConfig) != "" && b.GetString(tokenConfig) == "" { b.Log.Debugf("Choosing webhooks based receiving") go b.handleMatterHook(messages) } else { diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index a9a89c31..384581ef 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -204,7 +204,7 @@ func (b *Bslack) Send(msg config.Message) (string, error) { } // Use webhook to send the message - if b.GetString(outgoingWebhookConfig) != "" { + if b.GetString(outgoingWebhookConfig) != "" && b.GetString(tokenConfig) == "" { return "", b.sendWebhook(msg) } return b.sendRTM(msg) |