diff options
author | Vitaly Takmazov | 2018-07-17 12:28:46 +0000 |
---|---|---|
committer | Vitaly Takmazov | 2018-07-17 12:28:46 +0000 |
commit | ca2ed5206a2e882d3405217a5c75786561b02c3c (patch) | |
tree | 5def5502469e78b6fbeff0b4ee81a664c4b68910 /juick-server/src/main | |
parent | 3dc905264185b1032842530305d012421c796363 (diff) |
Revert "XMPP: route presences over XMPPRouter/babbler component"
This reverts commit 272a1af5b068a5585784f74e86dc277b32c691f3.
Diffstat (limited to 'juick-server/src/main')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/XMPPConnection.java | 7 |
1 files changed, 3 insertions, 4 deletions
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); |