aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java b/juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java
index a3c30964..638f12af 100644
--- a/juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java
+++ b/juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java
@@ -5,6 +5,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import rocks.xmpp.addr.Jid;
import rocks.xmpp.core.XmppException;
+import rocks.xmpp.core.stanza.model.IQ;
import rocks.xmpp.core.stanza.model.Message;
import rocks.xmpp.core.stanza.model.Stanza;
import rocks.xmpp.core.stanza.model.client.ClientMessage;
@@ -65,6 +66,13 @@ public class XMPPConnection implements AutoCloseable {
route(jid.getDomain(), ClientMessage.from(message));
}
});
+ router.addInboundIQListener(e -> {
+ IQ iq = e.getIQ();
+ Jid jid = iq.getTo();
+ if (!jid.getDomain().equals(xmpp.HOSTNAME)) {
+ route(jid.getDomain(), iq);
+ }
+ });
try {
router.connect();
} catch (XmppException e) {