OMEMO bugfix. Don't auto-create device list without JID

This commit is contained in:
JC Brand 2022-04-20 08:51:53 +02:00
parent 4c394c072e
commit d4382fda19
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import { IQError } from './errors.js';
import { Model } from '@converse/skeletor/src/model.js';
import { UNDECIDED } from './consts.js';
import { _converse, api, converse } from '@converse/headless/core';
import { parseBundle, handleMessageSendError } from './utils.js';
import { parseBundle } from './utils.js';
const { Strophe, sizzle, u, $iq } = converse.env;

View File

@ -632,13 +632,13 @@ export async function restoreOMEMOSession () {
}
async function fetchDeviceLists () {
_converse.devicelists = new _converse.DeviceLists();
const id = `converse.devicelists-${_converse.bare_jid}`;
_converse.devicelists = new _converse.DeviceLists({ id });
initStorage(_converse.devicelists, id);
await new Promise(resolve => {
_converse.devicelists.fetch({
'success': resolve,
'error': (m, e) => { log.error(e); resolve(); }
'error': (_m, e) => { log.error(e); resolve(); }
})
});
// Call API method to wait for our own device list to be fetched from the