summaryrefslogtreecommitdiffstats
path: root/bridge/slack
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-11-25 00:34:14 +0100
committerWim <wim@42.be>2018-11-29 00:04:53 +0100
commit73501739d5527f1d76dbde10e79e409a1c78d630 (patch)
treeac911cc0b697dfc83da6f08740bcc0f23150ad95 /bridge/slack
parentba674af5d46ebadbee3c61dfaf89b1f1dfaa05ce (diff)
downloadmatterbridge-msglm-73501739d5527f1d76dbde10e79e409a1c78d630.tar.gz
matterbridge-msglm-73501739d5527f1d76dbde10e79e409a1c78d630.tar.bz2
matterbridge-msglm-73501739d5527f1d76dbde10e79e409a1c78d630.zip
Do not post empty messages (slack). Fixes #574
Diffstat (limited to 'bridge/slack')
-rw-r--r--bridge/slack/slack.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go
index 4251f83b..d5a6084b 100644
--- a/bridge/slack/slack.go
+++ b/bridge/slack/slack.go
@@ -357,6 +357,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 {