Bugfix. Read jid from settings

Now that app settings are now longer saved directly on the `_converse` object
This commit is contained in:
JC Brand 2021-09-23 22:27:48 +02:00
parent 1104b28758
commit d4f6b040f3

View File

@ -293,7 +293,7 @@ export const api = _converse.api = {
* @returns {void}
*/
async login (jid, password, automatic=false) {
jid = jid || _converse.jid;
jid = jid || api.settings.get('jid');
if (!_converse.connection?.jid || (jid && !u.isSameDomain(_converse.connection.jid, jid))) {
await _converse.initConnection();
}