diff options
author | Wim <wim@42.be> | 2018-11-25 00:34:14 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-11-25 19:26:47 +0100 |
commit | 0929535b2e44a01ac8085adfa4e2fd3b9c1599ef (patch) | |
tree | 0de581b8620946e0451e5f2e3c699a7b77d7a334 /bridge | |
parent | c6fd65d1d7f5085890c0a00d37be8d6abb458921 (diff) | |
download | matterbridge-msglm-0929535b2e44a01ac8085adfa4e2fd3b9c1599ef.tar.gz matterbridge-msglm-0929535b2e44a01ac8085adfa4e2fd3b9c1599ef.tar.bz2 matterbridge-msglm-0929535b2e44a01ac8085adfa4e2fd3b9c1599ef.zip |
Do not post empty messages (slack). Fixes #574
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/slack/slack.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 0951fb10..307a9023 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -356,6 +356,10 @@ func (b *Bslack) editMessage(msg *config.Message, channelInfo *slack.Channel) (b } func (b *Bslack) postMessage(msg *config.Message, messageParameters *slack.PostMessageParameters, channelInfo *slack.Channel) (string, error) { + // don't post empty messages + if msg.Text == "" { + return "", nil + } for { _, id, err := b.rtm.PostMessage(channelInfo.ID, msg.Text, *messageParameters) if err == nil { |