Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 6bb644f7cdc9976915db02348931d1a7415cf49f Author: Wim <wim@42.be> Date: Thu Mar 02 23:51:19 2017 +0000 Do not forward empty message from any bridge (general). Closes #128 diff --git a/gateway/gateway.go b/gateway/gateway.go index 5e85926..254fb89 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -1786 +17810 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) {  }    func (gw *Gateway) ignoreMessage(msg *config.Message) bool { + if msg.Text == "" { + log.Debugf("ignoring empty message %#v from %s", msg, msg.Account) + return true + }   for _, entry := range strings.Fields(gw.Bridges[msg.Account].Config.IgnoreNicks) {   if msg.Username == entry {   log.Debugf("ignoring %s from %s", msg.Username, msg.Account)