aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-08-25 23:42:42 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-08-25 23:42:42 +0200
commite98ab37c9df7fdc0ef6e2900e8979467bae34e28 (patch)
tree7eda6e0efea90ced62ab1dd4cf3cfe47cf35c9cd /src/main/java/eu/siacs
parentcbda5a501645cd0db0aa42011d84f7c51f1bfcfe (diff)
made payment required error standard compliant
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
index 739e8ac2..ddc538e5 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -510,11 +510,12 @@ public class XmppConnection implements Runnable {
break;
} else if (nextTag.isStart("failure")) {
final Element failure = tagReader.readElement(nextTag);
- final String accountDisabled = failure.findChildContent("account-disabled");
- if (accountDisabled != null
- && accountDisabled.contains("renew")
+ final String text = failure.findChildContent("text");
+ if (failure.hasChild("account-disabled")
+ && text != null
+ && text.contains("renew")
&& Config.MAGIC_CREATE_DOMAIN != null
- && accountDisabled.contains(Config.MAGIC_CREATE_DOMAIN)) {
+ && text.contains(Config.MAGIC_CREATE_DOMAIN)) {
throw new PaymentRequiredException();
} else {
throw new UnauthorizedException();