Commit ec68dc1c authored by JC Brand's avatar JC Brand

Always set JID on the connection

So that the resource is passed along when we manually bind.

Related to bd81b897
parent 119966d9
......@@ -528,14 +528,14 @@ async function initUserSession (jid) {
async function setUserJID (jid) {
await initUserSession(jid);
jid = _converse.session.get('jid') || jid;
if (!Strophe.getResourceFromJid(jid)) {
jid = jid.toLowerCase() + _converse.generateResource();
// Set JID on the connection object so that when we call
// `connection.bind` the new resource is found by Strophe.js
// and sent to the XMPP server.
_converse.connection.jid = jid;
}
// Set JID on the connection object so that when we call
// `connection.bind` the new resource is found by Strophe.js
// and sent to the XMPP server.
_converse.connection.jid = jid;
_converse.jid = jid;
_converse.bare_jid = Strophe.getBareJidFromJid(jid);
_converse.resource = Strophe.getResourceFromJid(jid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment