diff --git a/src/client.ts b/src/client.ts index e0f40a8a2ba..3cd18a0f0e6 100644 --- a/src/client.ts +++ b/src/client.ts @@ -3102,18 +3102,6 @@ export class MatrixClient extends TypedEventEmitter { - const privKey = await this.crypto.backupManager.getKey(); - return this.restoreKeyBackup( - privKey, targetRoomId, targetSessionId, backupInfo, opts, - ); - } - private async restoreKeyBackup( privKey: ArrayLike, targetRoomId: undefined, diff --git a/src/crypto/backup.ts b/src/crypto/backup.ts index 94ec3c62445..2f03865824d 100644 --- a/src/crypto/backup.ts +++ b/src/crypto/backup.ts @@ -301,7 +301,7 @@ export class BackupManager { || now - this.sessionLastCheckAttemptedTime[targetSessionId] > KEY_BACKUP_CHECK_RATE_LIMIT ) { this.sessionLastCheckAttemptedTime[targetSessionId] = now; - await this.baseApis.restoreKeyBackupWithBackupManager(targetRoomId, targetSessionId, this.backupInfo, {}); + await this.baseApis.restoreKeyBackupWithCache(targetRoomId, targetSessionId, this.backupInfo, {}); } }