Use encyption key for Rust Crypto indexed DB

This commit is contained in:
N-Pex 2025-05-16 10:19:46 +02:00
parent aa1ce4ee48
commit 5f6132d745

View file

@ -318,10 +318,13 @@ export default {
cryptoStore: cryptoStore
//useAuthorizationHeader: true
};
const cryptoStorePassword = this.$config.appName + ":" + user.device_id;
const matrixClient = sdk.createClient(opts);
this.matrixClient = matrixClient;
await this.matrixClient.initRustCrypto({useIndexedDB: this.rememberMe});// storageKey: cryptoStorageKey});
console.log("Crypto initialized");
await this.matrixClient.initRustCrypto({useIndexedDB: this.rememberMe, storagePassword: cryptoStorePassword});
console.log("Crypto initialized", cryptoStorePassword);
this.addMatrixClientListeners(this.matrixClient);
this.matrixClient.startClient();
if (!this.matrixClient.isInitialSyncComplete()) {