From 4070b97ba1255ec65cb53b6f6cbede5b9bfe181a Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Fri, 17 Jan 2025 18:35:01 +0530 Subject: [PATCH] start indexedDBStore --- src/client/initMatrix.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/initMatrix.ts b/src/client/initMatrix.ts index 6ac3e4f21..b64fa883a 100644 --- a/src/client/initMatrix.ts +++ b/src/client/initMatrix.ts @@ -21,18 +21,21 @@ export const initClient = async (session: Session): Promise => { dbName: 'web-sync-store', }); + const legacyCryptoStore = new IndexedDBCryptoStore(global.indexedDB, 'crypto-store'); + const mx = createClient({ baseUrl: session.baseUrl, accessToken: session.accessToken, userId: session.userId, store: indexedDBStore, - cryptoStore: new IndexedDBCryptoStore(global.indexedDB, 'crypto-store'), + cryptoStore: legacyCryptoStore, deviceId: session.deviceId, timelineSupport: true, cryptoCallbacks: cryptoCallbacks as any, verificationMethods: ['m.sas.v1'], }); + await indexedDBStore.startup(); await mx.initRustCrypto(); mx.setGlobalErrorOnUnknownDevices(false);