Skip to content

Commit

Permalink
Deprecate restoreKeyBackup* in MatrixClient
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Oct 29, 2024
1 parent 5caf7ee commit bc49f0b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3696,6 +3696,8 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
* @param opts - Optional params such as callbacks
* @returns Status of restoration with `total` and `imported`
* key counts.
*
* @deprecated Prefer {@link CryptoApi.restoreKeyBackupWithPassword | `CryptoApi.restoreKeyBackupWithPassword`}.
*/
public async restoreKeyBackupWithPassword(
password: string,
Expand Down Expand Up @@ -3741,6 +3743,8 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
* @param opts - Optional params such as callbacks
* @returns Status of restoration with `total` and `imported`
* key counts.
*
* @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
*/
public async restoreKeyBackupWithSecretStorage(
backupInfo: IKeyBackupInfo,
Expand Down Expand Up @@ -3778,6 +3782,8 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
* @returns Status of restoration with `total` and `imported`
* key counts.
*
* @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
*/
public restoreKeyBackupWithRecoveryKey(
recoveryKey: string,
Expand Down Expand Up @@ -3811,6 +3817,15 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
return this.restoreKeyBackup(privKey, targetRoomId!, targetSessionId!, backupInfo, opts);
}

/**
* Restore from an existing key backup via a private key stored locally
* @param targetRoomId
* @param targetSessionId
* @param backupInfo
* @param opts
*
* @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
*/
public async restoreKeyBackupWithCache(
targetRoomId: undefined,
targetSessionId: undefined,
Expand Down

0 comments on commit bc49f0b

Please sign in to comment.