From 93307b57aa830b0bfbf052264243f9e047b77089 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 21 Jul 2018 23:19:11 +0200 Subject: Skip empty messages being sent with the webhook (discord). #469 --- bridge/discord/discord.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bridge/discord') 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, -- cgit v1.2.3