diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-09-14 12:26:38 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-09-14 12:26:38 +0200 |
commit | 4359afacb4a6ff52134485265b4c4a3b68542c11 (patch) | |
tree | 37482afd0e2eb35b5514dd65e7b3443bfe7082b1 /src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | |
parent | 7b52e6984c04d3e6aa5d056382d748886111e14f (diff) |
store jid if it was changed during bind
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index fca5c566..e3af48e3 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -981,7 +981,10 @@ public class XmppConnection implements Runnable { final Element jid = bind.findChild("jid"); if (jid != null && jid.getContent() != null) { try { - account.setJid(Jid.fromString(jid.getContent())); + if (account.setJid(Jid.fromString(jid.getContent()))) { + Log.d(Config.LOGTAG,account.getJid().toBareJid()+": bare jid changed during bind. updating database"); + mXmppConnectionService.databaseBackend.updateAccount(account); + } if (streamFeatures.hasChild("session") && !streamFeatures.findChild("session").hasChild("optional")) { sendStartSession(); |