1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Undeprecate MatrixClient.getKeyBackupVersion (#3733)

... and add some better documentation while we're at it.
This commit is contained in:
Richard van der Hoff
2023-09-19 19:33:41 +02:00
committed by GitHub
parent 23d244520c
commit d2ea149012

View File

@@ -3313,10 +3313,14 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
}
/**
* Get information about the current key backup.
* @returns Information object from API or null
* Get information about the current key backup from the server.
*
* @deprecated Prefer {@link CryptoApi.checkKeyBackupAndEnable}.
* Performs some basic validity checks on the shape of the result, and raises an error if it is not as expected.
*
* **Note**: there is no (supported) way to distinguish between "failure to talk to the server" and "another client
* uploaded a key backup version using an algorithm I don't understand.
*
* @returns Information object from API, or null if no backup is present on the server.
*/
public async getKeyBackupVersion(): Promise<IKeyBackupInfo | null> {
let res: IKeyBackupInfo;