aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/xmpp
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-08-25 23:42:42 +0200
committerChristian Schneppe <christian@pix-art.de>2016-08-26 22:30:40 +0200
commitb7052b70f25367668f627aea712b97d8872c94df (patch)
treee6c3bc0e5bae6158832b0821d5686c67fd58a159 /src/main/java/de/pixart/messenger/xmpp
parent5551fd11652c454c0e3cd93ea2e5ac271deb39b6 (diff)
made payment required error standard compliant
Diffstat (limited to 'src/main/java/de/pixart/messenger/xmpp')
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/XmppConnection.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
index d3534daa4..d1012c761 100644
--- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
@@ -523,11 +523,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();