From 40a967523ca8e4c75c4253db286639d7471f3cc6 Mon Sep 17 00:00:00 2001 From: Wim Date: Wed, 26 Oct 2016 00:12:31 +0200 Subject: Ignore empty content from discord. Fixes #58 --- bridge/discord/discord.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bridge/discord/discord.go') diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index 98968fde..7cf7e89f 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -111,6 +111,9 @@ func (b *bdiscord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreat m.Content = m.Content + "\n" + attach.URL } } + if m.Content == "" { + return + } flog.Debugf("Sending message from %s on %s to gateway", m.Author.Username, b.FullOrigin()) b.Remote <- config.Message{Username: m.Author.Username, Text: m.Content, Channel: b.getChannelName(m.ChannelID), Origin: b.origin, Protocol: b.protocol, FullOrigin: b.FullOrigin()} -- cgit v1.2.3