diff options
author | Vitaly Takmazov | 2017-02-06 19:17:26 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-02-06 19:17:26 +0300 |
commit | 37fa69d19152202384308c5b368943ad1348c74b (patch) | |
tree | 278a9da8d14f3542842019860897c13373cd782b | |
parent | d0ca065097636c2e3313582849b0a88ad9b1bf16 (diff) |
juick-xmpp: fix message routing
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java | 9 |
1 files changed, 5 insertions, 4 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 a082c4cb..a3c30964 100644 --- a/juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java +++ b/juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java @@ -7,6 +7,7 @@ import rocks.xmpp.addr.Jid; import rocks.xmpp.core.XmppException; import rocks.xmpp.core.stanza.model.Message; import rocks.xmpp.core.stanza.model.Stanza; +import rocks.xmpp.core.stanza.model.client.ClientMessage; import rocks.xmpp.extensions.component.accept.ExternalComponent; import rocks.xmpp.extensions.nick.model.Nickname; import rocks.xmpp.extensions.oob.model.x.OobX; @@ -61,7 +62,7 @@ public class XMPPConnection implements AutoCloseable { } } } else { - route(jid.getDomain(), message); + route(jid.getDomain(), ClientMessage.from(message)); } }); try { @@ -140,7 +141,7 @@ public class XMPPConnection implements AutoCloseable { for (String jid : jids) { msg.setTo(Jid.of(jid)); - route(msg.getTo().getDomain(), msg); + route(msg.getTo().getDomain(), ClientMessage.from(msg)); } } @@ -171,7 +172,7 @@ public class XMPPConnection implements AutoCloseable { for (User user : users) { for (String jid : xmpp.userService.getJIDsbyUID(user.getUid())) { msg.setTo(Jid.of(jid)); - route(msg.getTo().getDomain(), msg); + route(msg.getTo().getDomain(), ClientMessage.from(msg)); } } } @@ -220,7 +221,7 @@ public class XMPPConnection implements AutoCloseable { for (User user : users) { for (String jid : xmpp.userService.getJIDsbyUID(user.getUid())) { msg.setTo(Jid.of(jid)); - route(msg.getTo().getDomain(), msg); + route(msg.getTo().getDomain(), ClientMessage.from(msg)); } } } |