diff options
author | Wim <wim@42.be> | 2018-07-21 23:19:11 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2018-07-21 23:19:11 +0200 |
commit | 93307b57aa830b0bfbf052264243f9e047b77089 (patch) | |
tree | 9ceb5d954316033f31551e79f601a212975ca9f7 /bridge | |
parent | 618953c8650237f4f8540d38b02690549ef62d39 (diff) | |
download | matterbridge-msglm-93307b57aa830b0bfbf052264243f9e047b77089.tar.gz matterbridge-msglm-93307b57aa830b0bfbf052264243f9e047b77089.tar.bz2 matterbridge-msglm-93307b57aa830b0bfbf052264243f9e047b77089.zip |
Skip empty messages being sent with the webhook (discord). #469
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/discord/discord.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index bb3fcb82..cd06eeaf 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -137,6 +137,10 @@ func (b *Bdiscord) Send(msg config.Message) (string, error) { msg.Text += " " + fi.URL } } + // skip empty messages + if msg.Text == "" { + return "", nil + } err := b.c.WebhookExecute( wID, wToken, |