Pass the jid to restore

if it's defined, then we want the extra check that the jids match, otherwise
we might be attaching to someone else's session.
This commit is contained in:
JC Brand 2016-05-31 10:24:36 +00:00
parent 0002c0bd53
commit f9528e7144

View File

@ -1683,7 +1683,7 @@
*/
if (this.keepalive) {
try {
return this.connection.restore(undefined, this.onConnectStatusChanged);
return this.connection.restore(this.jid, this.onConnectStatusChanged);
} catch (e) {
this.log("Could not restore session. Error message: "+e.message);
this.clearSession(); // If there's a roster, we want to clear it (see #555)