You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
Make backup restore work
This commit is contained in:
@@ -1013,7 +1013,7 @@ MatrixClient.prototype.restoreKeyBackupWithPassword = async function(
|
||||
) {
|
||||
const backupInfo = await this.getKeyBackupVersion();
|
||||
|
||||
const privKey = keyForExistingBackup(backupInfo, password);
|
||||
const privKey = await keyForExistingBackup(backupInfo, password);
|
||||
return this._restoreKeyBackup(
|
||||
privKey, targetRoomId, targetSessionId, version,
|
||||
);
|
||||
@@ -1041,7 +1041,7 @@ MatrixClient.prototype._restoreKeyBackup = function(
|
||||
|
||||
const decryption = new global.Olm.PkDecryption();
|
||||
try {
|
||||
decryption.init_with_private_key(privkey);
|
||||
decryption.init_with_private_key(privKey);
|
||||
} catch(e) {
|
||||
decryption.free();
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user