aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java')
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPConnection.java7
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);