First batch: remove deprecated calls on MatrixClient (#28207)

* Remove `initCrypto` mocking

* Remove `MatrixClient.downloadKeys` mocking

* Remove `MatrixClient.getStoredDevice` mocking

* Replace `MatrixClient.setGlobalBlacklistUnverifiedDevices` by `MatrixClient.CryptoApi.globalBlacklistUnverifiedDevices`

* Remove `MatrixClient.getStoredCrossSigningForUser` mocking

* Replace `MatrixClient.legacyDeviceVerification` by `MatrixClient.CryptoApi.requestDeviceVerification`

* Remove `MatrixClient.isCrossSigningReady` mock

* Replace `MatrixClient.bootstrapCrossSigning` by `MatrixClient.getCrypto.bootstrapCrossSigning`

* Replace `MatrixClient.getCryptoTrustCrossSignedDevices` by `MatrixClient.getCrypto.getTrustCrossSignedDevices`

* Replace `MatrixClient.hasSecretStorageKey` by `MatrixClient.SecretStorage.hasKey`

* Replace `MatrixClient.getDefaultSecretStorageKeyId` by `MatrixClient.SecretStorage.getDefaultKeyId`

* Remove `MatrixClient.encryptAndSendToDevices` call
This commit is contained in:
Florian Duros 2024-10-21 13:53:39 +02:00 committed by GitHub
parent 26a98e5e30
commit 46d13921d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 22 additions and 55 deletions

View file

@ -1709,9 +1709,10 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
}
}
if (cli.getCrypto()) {
const crypto = cli.getCrypto();
if (crypto) {
const blacklistEnabled = SettingsStore.getValueAt(SettingLevel.DEVICE, "blacklistUnverifiedDevices");
cli.setGlobalBlacklistUnverifiedDevices(blacklistEnabled);
crypto.globalBlacklistUnverifiedDevices = blacklistEnabled;
// With cross-signing enabled, we send to unknown devices
// without prompting. Any bad-device status the user should