Otherwise we can run into race conditions when using IndexedDB with mergebounce
@@ -120,6 +120,8 @@ export default {
*
*/
async get (jids, attrs={}, create=false) {
+ await api.waitUntil('chatBoxesFetched');
+
async function _get (jid) {
let model = await api.chatboxes.get(jid);
if (!model && create) {
@@ -137,6 +137,8 @@ export default {
* });
async get (jids, attrs = {}, create = false) {
jid = u.getJIDFromURI(jid);