5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-24 17:15:40 +00:00

Ignore empty content from discord. Fixes #58

This commit is contained in:
Wim 2016-10-26 00:12:31 +02:00
parent d3a34af073
commit 40a967523c

View File

@ -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()}