5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 16:20:26 +00:00

Fix panic on WebhookURL only setting (mattermost). Closes #916 (#917)

This commit is contained in:
Wim 2019-10-04 01:01:24 +02:00 committed by GitHub
parent 1d708ab351
commit 00967a98ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,11 @@ func (b *Bmattermost) handleMatter() {
} else { } else {
b.Log.Debugf("Choosing login/password based receiving") 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) go b.handleMatterClient(messages)
} }
var ok bool var ok bool