summaryrefslogtreecommitdiffstats
path: root/bridge/discord
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-07-21 23:19:11 +0200
committerWim <wim@42.be>2018-07-21 23:19:11 +0200
commit93307b57aa830b0bfbf052264243f9e047b77089 (patch)
tree9ceb5d954316033f31551e79f601a212975ca9f7 /bridge/discord
parent618953c8650237f4f8540d38b02690549ef62d39 (diff)
downloadmatterbridge-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/discord')
-rw-r--r--bridge/discord/discord.go4
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,