diff options
author | Wim <wim@42.be> | 2016-10-26 00:12:31 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2016-10-26 00:12:31 +0200 |
commit | 40a967523ca8e4c75c4253db286639d7471f3cc6 (patch) | |
tree | 0dac6f10726a5863ad9e5532baa0e85c610f3bee /bridge/discord/discord.go | |
parent | d3a34af07307a1b2360c2b32b6ffd726e075bcb5 (diff) | |
download | matterbridge-msglm-40a967523ca8e4c75c4253db286639d7471f3cc6.tar.gz matterbridge-msglm-40a967523ca8e4c75c4253db286639d7471f3cc6.tar.bz2 matterbridge-msglm-40a967523ca8e4c75c4253db286639d7471f3cc6.zip |
Ignore empty content from discord. Fixes #58
Diffstat (limited to 'bridge/discord/discord.go')
-rw-r--r-- | bridge/discord/discord.go | 3 |
1 files changed, 3 insertions, 0 deletions
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()} |