From 698237a43fdec147003c471c8a9152f839acf28f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 7 Feb 2017 11:57:34 +0300 Subject: juick-xmpp: route iq results --- juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'juick-xmpp/src/main/java/com/juick/components') 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) { -- cgit v1.2.3