From 1bd68a42b20949f7880cc8aa51d472e363830c7f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 22 Oct 2015 11:20:36 +0200 Subject: join muc even if initial conference configuration fetch failed --- .../xmpp/stanzas/AbstractAcknowledgeableStanza.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/main/java/eu/siacs/conversations/xmpp') 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 a5de4a847..fa5e6fbdd 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; + } } -- cgit v1.2.3