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

Fix up comments on globalErrorOnUnknownDevices (#3834)

The current deprecation notice advises you to use a method which does something
completely different.

Fixing this "properly" is slightly challenging because we don't want to support
setting it to `true` in Rust Crypto; yet I don't really want to change the
default for legacy crypto.

Let's just document the behaviour for now.
This commit is contained in:
Richard van der Hoff
2023-10-25 15:32:16 +01:00
committed by GitHub
parent 73a87652fe
commit 084beaa947
3 changed files with 14 additions and 6 deletions

View File

@@ -88,7 +88,6 @@ const KEY_BACKUP_CHECK_RATE_LIMIT = 5000; // ms
* @internal
*/
export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEventMap> implements CryptoBackend {
public globalErrorOnUnknownDevices = false;
private _trustCrossSignedDevices = true;
/** whether {@link stop} has been called */
@@ -220,6 +219,15 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public set globalErrorOnUnknownDevices(_v: boolean) {
// Not implemented for rust crypto.
}
public get globalErrorOnUnknownDevices(): boolean {
// Not implemented for rust crypto.
return false;
}
public stop(): void {
// stop() may be called multiple times, but attempting to close() the OlmMachine twice
// will cause an error.