Return when we have only WebhookURL (mattermost). Fixes #954

This commit is contained in:
Wim
2019-12-15 23:42:33 +01:00
parent 12d2c6fe89
commit 052242f9ce

View File

@@ -67,9 +67,8 @@ func (b *Bmattermost) handleMatter() {
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") != "" {
if b.GetString("WebhookBindAddress") == "" && b.GetString("WebhookURL") != "" && b.GetString("Token") == "" && b.GetString("Login") == "" {
b.Log.Debugf("No WebhookBindAddress specified, only WebhookURL. You will not receive messages from mattermost, only sending is possible.")
return
}
go b.handleMatterClient(messages)
}