aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/xmpp
diff options
context:
space:
mode:
authorChristian S <christian@pix-art.de>2015-10-22 20:31:08 +0200
committerChristian S <christian@pix-art.de>2015-10-22 20:31:08 +0200
commit2c179a1d41c50f74049ed794bcb1dfdb7de30870 (patch)
treea321d6931b6b37906e3a1b4e8f308ef2bbf5e13c /src/main/java/eu/siacs/conversations/xmpp
parent83ec2b12552b533a3b5cc7a7e8ec695d17bbf447 (diff)
parent1bd68a42b20949f7880cc8aa51d472e363830c7f (diff)
Merge remote-tracking branch 'siacs/master' into development
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/stanzas/AbstractAcknowledgeableStanza.java14
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 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;
+ }
}