From 8eb9ba32b5a8e839d235325cb9fd2bd98937517c Mon Sep 17 00:00:00 2001 From: karmanyaahm Date: Tue, 21 Sep 2021 05:24:30 +0200 Subject: [PATCH] Add a not condition to an if statement --- distributor/xmpp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distributor/xmpp.go b/distributor/xmpp.go index cba241a..2a0dee6 100644 --- a/distributor/xmpp.go +++ b/distributor/xmpp.go @@ -113,7 +113,7 @@ func (s *XMPPService) message(msgHead stanza.Message, t xmlstream.TokenReadEncod return nil } from := msgHead.From.String() - if settings := strings.Split(conn.Settings, ":"); len(settings) > 1 && settings[0] == from { + if settings := strings.Split(conn.Settings, ":"); !(len(settings) > 1 && settings[0] == from) { log.WithField("from", from).Info("message not from gateway, that is no notification") return nil }