diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-08-25 13:50:54 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-08-26 19:46:55 +0200 |
commit | 9d24645786a2fb634b28320ed755fdcc8c1a38f8 (patch) | |
tree | 43fa6df276c8c6c62d4adb391f98dc65915a9111 /src/main/java/de/pixart/messenger/xmpp/XmppConnection.java | |
parent | b9435954f908984a30f006a4b215809702b89f32 (diff) |
send register IQs without full from
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/xmpp/XmppConnection.java | 7 |
1 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 b0a91af99..d3534daa4 100644 --- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java @@ -892,7 +892,7 @@ public class XmppConnection implements Runnable { final IqPacket register = new IqPacket(IqPacket.TYPE.GET); register.query("jabber:iq:register"); register.setTo(account.getServer()); - sendIqPacket(register, new OnIqPacketReceived() { + sendUnmodifiedIqPacket(register, new OnIqPacketReceived() { @Override public void onIqPacketReceived(final Account account, final IqPacket packet) { @@ -905,7 +905,8 @@ public class XmppConnection implements Runnable { final Element password = new Element("password").setContent(account.getPassword()); register.query("jabber:iq:register").addChild(username); register.query().addChild(password); - sendIqPacket(register, registrationResponseListener); + register.setFrom(account.getJid().toBareJid()); + sendUnmodifiedIqPacket(register, registrationResponseListener); } else if (packet.getType() == IqPacket.TYPE.RESULT && (packet.query().hasChild("x", "jabber:x:data"))) { final Data data = Data.parse(packet.query().findChild("x", "jabber:x:data")); @@ -1271,7 +1272,7 @@ public class XmppConnection implements Runnable { return this.sendUnmodifiedIqPacket(packet, callback); } - private synchronized String sendUnmodifiedIqPacket(final IqPacket packet, final OnIqPacketReceived callback) { + public synchronized String sendUnmodifiedIqPacket(final IqPacket packet, final OnIqPacketReceived callback) { if (packet.getId() == null) { final String id = nextRandomId(); packet.setAttribute("id", id); |