From ca2ed5206a2e882d3405217a5c75786561b02c3c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 17 Jul 2018 12:28:46 +0000 Subject: Revert "XMPP: route presences over XMPPRouter/babbler component" This reverts commit 272a1af5b068a5585784f74e86dc277b32c691f3. --- juick-server/src/main/java/com/juick/server/XMPPConnection.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'juick-server/src/main/java') diff --git a/juick-server/src/main/java/com/juick/server/XMPPConnection.java b/juick-server/src/main/java/com/juick/server/XMPPConnection.java index 3f15a2b9..b63a4d47 100644 --- a/juick-server/src/main/java/com/juick/server/XMPPConnection.java +++ b/juick-server/src/main/java/com/juick/server/XMPPConnection.java @@ -255,9 +255,6 @@ public class XMPPConnection implements StanzaListener, NotificationListener { broadcastPresence(null); } }); - router.addInboundPresenceListener(event -> { - incomingPresence(event.getPresence()); - }); service.submit(() -> { try { router.connect(); @@ -633,7 +630,9 @@ public class XMPPConnection implements StanzaListener, NotificationListener { public void stanzaReceived(Stanza xmlValue) { if (xmlValue instanceof Presence) { Presence p = (Presence) xmlValue; - router.send(p); + if (p.getType() == null || !p.getType().equals(Presence.Type.ERROR)) { + incomingPresence(p); + } } else if (xmlValue instanceof Message) { Message msg = (Message) xmlValue; router.send(msg); -- cgit v1.2.3