aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/xmpp
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-02-19 20:58:23 +0100
committerChristian Schneppe <christian@pix-art.de>2018-02-19 20:58:23 +0100
commit2e29525bd7df66fe4eb7b5c1683ca4822acefbb3 (patch)
treeff7b57610082385de8b2e032a13b29e4f647043d /src/main/java/de/pixart/messenger/xmpp
parent26ae6626b8f52b10030ad474d4b258ba533b26a9 (diff)
Namespace: Add constant for 'jabber:x:data' & Make use of Namespace.DATA constant
Diffstat (limited to 'src/main/java/de/pixart/messenger/xmpp')
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/XmppConnection.java4
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/forms/Data.java3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
index f7c80d841..f58aeb671 100644
--- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
@@ -1007,8 +1007,8 @@ public class XmppConnection implements Runnable {
register.query().addChild(password);
register.setFrom(account.getJid().toBareJid());
sendUnmodifiedIqPacket(register, registrationResponseListener);
- } else if (query.hasChild("x", "jabber:x:data")) {
- final Data data = Data.parse(query.findChild("x", "jabber:x:data"));
+ } else if (query.hasChild("x", Namespace.DATA)) {
+ final Data data = Data.parse(query.findChild("x", Namespace.DATA));
final Element blob = query.findChild("data", "urn:xmpp:bob");
final String id = packet.getId();
InputStream is;
diff --git a/src/main/java/de/pixart/messenger/xmpp/forms/Data.java b/src/main/java/de/pixart/messenger/xmpp/forms/Data.java
index ed426f397..ba70a5d1a 100644
--- a/src/main/java/de/pixart/messenger/xmpp/forms/Data.java
+++ b/src/main/java/de/pixart/messenger/xmpp/forms/Data.java
@@ -7,6 +7,7 @@ import java.util.Collection;
import java.util.Iterator;
import java.util.List;
+import de.pixart.messenger.utils.Namespace;
import de.pixart.messenger.xml.Element;
public class Data extends Element {
@@ -15,7 +16,7 @@ public class Data extends Element {
public Data() {
super("x");
- this.setAttribute("xmlns", "jabber:x:data");
+ this.setAttribute("xmlns", Namespace.DATA);
}
public List<Field> getFields() {