Replace Matrix.getKeyBackupEnabled by MatrixClient.CryptoApi.getActiveSessionBackupVersion (#28225)

* Migrating deprecated sync `MatrixClient.getKeyBackupEnabled` to async `MatrixClient.CryptoApi.getActiveSessionBackupVersion` in `NewRecoveryMethodDialog`.
Rewrite `NewRecoveryMethodDialog` into a functional component to make it easier to handle the new async method.

* Migrating deprecated sync `MatrixClient.getKeyBackupEnabled` to async `MatrixClient.CryptoApi.getActiveSessionBackupVersion` in `MatrixChat`.
This commit is contained in:
Florian Duros 2024-10-18 11:45:45 +02:00 committed by GitHub
parent 85d2bf3a04
commit 1bb482f6f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 312 additions and 72 deletions

View file

@ -129,6 +129,7 @@ export function createTestClient(): MatrixClient {
getVerificationRequestsToDeviceInProgress: jest.fn().mockReturnValue([]),
setDeviceIsolationMode: jest.fn(),
prepareToEncrypt: jest.fn(),
getActiveSessionBackupVersion: jest.fn().mockResolvedValue(null),
}),
getPushActionsForEvent: jest.fn(),