mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-22 02:32:02 -08: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 {
|
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) {
|
for _, entry := range strings.Fields(gw.Bridges[msg.Account].Config.IgnoreNicks) {
|
||||||
if msg.Username == entry {
|
if msg.Username == entry {
|
||||||
log.Debugf("ignoring %s from %s", msg.Username, msg.Account)
|
log.Debugf("ignoring %s from %s", msg.Username, msg.Account)
|
||||||
|
Loading…
Reference in New Issue
Block a user