start indexedDBStore

This commit is contained in:
Ajay Bura 2025-01-17 18:35:01 +05:30
parent a20092d762
commit 4070b97ba1

View file

@ -21,18 +21,21 @@ export const initClient = async (session: Session): Promise<MatrixClient> => {
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);