xmpp.chapril.org-conversejs/src/plugins/omemo/devicelists.js
JC Brand 89a3c81a19 OMEMO: don't wait for all device lists...
to be fetched from the server before triggering OMEMOInitialized.

For some contacts, the IQ to fetch the device list never receives a
response. IQ stanzas take 20 seconds to timeout, which means that all
OMEMO operations are blocked for 20 seconds (because everything waits
for `OMEMOInitialized`).

Create a new API method `api.omemo.devicelists.get` and use that to
fetch and `await` for any devicelist. That way we lazily wait for
devicelists to be fetched from the server and can continue with other
OMEMO operations unrelated to users who's clients don't respond to
devicelist queries.
2022-03-10 20:51:04 +01:00

12 lines
275 B
JavaScript

import DeviceList from './devicelist.js';
import { Collection } from '@converse/skeletor/src/collection';
/**
* @class
* @namespace _converse.DeviceLists
* @memberOf _converse
*/
const DeviceLists = Collection.extend({ model: DeviceList });
export default DeviceLists;