summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2019-10-04 01:01:24 +0200
committerGitHub <noreply@github.com>2019-10-04 01:01:24 +0200
commit00967a98ac918cfdb66a5a1e9dd8af69dd7e2cc7 (patch)
tree23255557ec5cb8a215221f18c750d19804eeaad7
parent1d708ab35196d814c932cb8570cfd01fa541f3fa (diff)
downloadmatterbridge-msglm-00967a98ac918cfdb66a5a1e9dd8af69dd7e2cc7.tar.gz
matterbridge-msglm-00967a98ac918cfdb66a5a1e9dd8af69dd7e2cc7.tar.bz2
matterbridge-msglm-00967a98ac918cfdb66a5a1e9dd8af69dd7e2cc7.zip
Fix panic on WebhookURL only setting (mattermost). Closes #916 (#917)
-rw-r--r--bridge/mattermost/handlers.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bridge/mattermost/handlers.go b/bridge/mattermost/handlers.go
index cd625c55..0b1c776a 100644
--- a/bridge/mattermost/handlers.go
+++ b/bridge/mattermost/handlers.go
@@ -66,6 +66,11 @@ func (b *Bmattermost) handleMatter() {
} else {
b.Log.Debugf("Choosing login/password based receiving")
}
+ // if for some reason we only want to sent stuff to mattermost but not receive, return
+ if b.GetString("WebhookBindAddress") == "" && b.GetString("WebhookURL") != "" {
+ b.Log.Debugf("No WebhookBindAddress specified, only WebhookURL. You will not receive messages from mattermost, only sending is possible.")
+ return
+ }
go b.handleMatterClient(messages)
}
var ok bool