diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-10-22 11:20:36 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-10-22 11:20:36 +0200 |
commit | 1bd68a42b20949f7880cc8aa51d472e363830c7f (patch) | |
tree | bcbd61249491216c0b852bb9bc2316aa0122cc8f /src/main/java/eu/siacs/conversations/xmpp/stanzas | |
parent | 3c45f00443e56557183f94d1152a0847342db510 (diff) |
join muc even if initial conference configuration fetch failed
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/stanzas/AbstractAcknowledgeableStanza.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/stanzas/AbstractAcknowledgeableStanza.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/AbstractAcknowledgeableStanza.java index a5de4a84..fa5e6fbd 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/stanzas/AbstractAcknowledgeableStanza.java +++ b/src/main/java/eu/siacs/conversations/xmpp/stanzas/AbstractAcknowledgeableStanza.java @@ -1,5 +1,7 @@ package eu.siacs.conversations.xmpp.stanzas; +import eu.siacs.conversations.xml.Element; + abstract public class AbstractAcknowledgeableStanza extends AbstractStanza { protected AbstractAcknowledgeableStanza(String name) { @@ -14,4 +16,16 @@ abstract public class AbstractAcknowledgeableStanza extends AbstractStanza { public void setId(final String id) { setAttribute("id", id); } + + public Element getError() { + Element error = findChild("error"); + if (error != null) { + for(Element element : error.getChildren()) { + if (!element.getName().equals("text")) { + return element; + } + } + } + return null; + } } |