diff options
author | Vitaly Takmazov | 2017-10-10 11:18:01 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-10-10 11:18:01 +0300 |
commit | 119966076222901579efa4b5378e227baff35de9 (patch) | |
tree | 0bb512ed4710932d753820d074c9469d3cb0fca8 /juick-xmpp/src/main/java/com/juick | |
parent | 4543e857c067b72bf441e4c3f6401cf410834654 (diff) |
xmpp: add real message to resource-constraint test
Diffstat (limited to 'juick-xmpp/src/main/java/com/juick')
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/JuickBot.java | 2 | ||||
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/XMPPServer.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/JuickBot.java b/juick-xmpp/src/main/java/com/juick/components/JuickBot.java index a9ee9698..5df24d16 100644 --- a/juick-xmpp/src/main/java/com/juick/components/JuickBot.java +++ b/juick-xmpp/src/main/java/com/juick/components/JuickBot.java @@ -205,7 +205,7 @@ public class JuickBot implements StanzaListener, AutoCloseable { public boolean incomingMessage(Message msg) { if (msg.getType() != null && msg.getType().equals(Message.Type.ERROR)) { - StanzaError error = msg.getExtension(StanzaError.class); + StanzaError error = msg.getError(); if (error != null && error.getCondition().equals(Condition.RESOURCE_CONSTRAINT)) { // offline query is full, deactivating this jid if (userService.setActiveStatusForJID(msg.getFrom().toEscapedString(), UserService.ActiveStatus.Inactive)) { diff --git a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java index cb2bb681..29d57d53 100644 --- a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java +++ b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java @@ -372,7 +372,7 @@ public class XMPPServer implements ConnectionListener, AutoCloseable { return !Arrays.asList(brokenSSLhosts).contains(connection.to.toEscapedString()); } - protected Stanza parse(String xml) { + public Stanza parse(String xml) { try { Unmarshaller unmarshaller = session.createUnmarshaller(); return (Stanza)unmarshaller.unmarshal(new StringReader(xml)); |