aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPConnection.java7
1 files changed, 4 insertions, 3 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 701a7d5b..78995e7a 100644
--- a/juick-server/src/main/java/com/juick/server/XMPPConnection.java
+++ b/juick-server/src/main/java/com/juick/server/XMPPConnection.java
@@ -249,6 +249,9 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
logger.info("component connected");
}
});
+ router.addInboundPresenceListener(event -> {
+ incomingPresence(event.getPresence());
+ });
service.submit(() -> {
try {
router.connect();
@@ -625,9 +628,7 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
public void stanzaReceived(Stanza xmlValue) {
if (xmlValue instanceof Presence) {
Presence p = (Presence) xmlValue;
- if (p.getType() == null || !p.getType().equals(Presence.Type.ERROR)) {
- incomingPresence(p);
- }
+ router.send(p);
} else if (xmlValue instanceof Message) {
Message msg = (Message) xmlValue;
router.send(msg);