mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 01:10:27 +00:00
Do not forward empty message from any bridge (general). Closes #128
This commit is contained in:
parent
32bbab8518
commit
35025e164a
@ -178,6 +178,10 @@ 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)
|
||||
|
Loading…
Reference in New Issue
Block a user