Skip to content

Commit

Permalink
Move setCryptoMode to right section
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Sep 18, 2024
1 parent 1318e53 commit 30532e4
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/rust-crypto/rust-crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ interface ISignableObject {
*/
export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEventMap> implements CryptoBackend {
private _trustCrossSignedDevices = true;
private cryptoMode = CryptoMode.Legacy;

/** whether {@link stop} has been called */
private stopped = false;
Expand Down Expand Up @@ -203,15 +204,6 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

private cryptoMode = CryptoMode.Legacy;

/**
* Implementation of {@link Crypto.CryptoApi#setCryptoMode}.
*/
public setCryptoMode(cryptoMode: CryptoMode): void {
this.cryptoMode = cryptoMode;
}

public set globalErrorOnUnknownDevices(_v: boolean) {
// Not implemented for rust crypto.
}
Expand Down Expand Up @@ -372,6 +364,13 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
return `Rust SDK ${versions.matrix_sdk_crypto} (${versions.git_sha}), Vodozemac ${versions.vodozemac}`;
}

/**
* Implementation of {@link Crypto.CryptoApi#setCryptoMode}.
*/
public setCryptoMode(cryptoMode: CryptoMode): void {
this.cryptoMode = cryptoMode;
}

/**
* Implementation of {@link CryptoApi#isEncryptionEnabledInRoom}.
*/
Expand Down

0 comments on commit 30532e4

Please sign in to comment.