aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-02-07 11:57:34 +0300
committerGravatar Vitaly Takmazov2017-02-07 11:57:34 +0300
commit698237a43fdec147003c471c8a9152f839acf28f (patch)
tree1b391a373b87b5218ed2f11e9253d2cab34eb49b /juick-xmpp/src/main
parentb536c2569aac0b45be0e37e691fa3a6f6c452b76 (diff)
juick-xmpp: route iq results
Diffstat (limited to 'juick-xmpp/src/main')
-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) {