You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
Element-R: implement {get,set}TrustCrossSignedDevices (#3281)
A precursor to https://github.com/vector-im/element-web/issues/25092
This commit is contained in:
committed by
GitHub
parent
95f7d1d347
commit
c61d53eed0
@@ -2764,24 +2764,28 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
||||
* Default: true
|
||||
*
|
||||
* @returns True if trusting cross-signed devices
|
||||
*
|
||||
* @deprecated Prefer {@link CryptoApi.getTrustCrossSignedDevices | `CryptoApi.getTrustCrossSignedDevices`}.
|
||||
*/
|
||||
public getCryptoTrustCrossSignedDevices(): boolean {
|
||||
if (!this.crypto) {
|
||||
if (!this.cryptoBackend) {
|
||||
throw new Error("End-to-end encryption disabled");
|
||||
}
|
||||
return this.crypto.getCryptoTrustCrossSignedDevices();
|
||||
return this.cryptoBackend.getTrustCrossSignedDevices();
|
||||
}
|
||||
|
||||
/**
|
||||
* See getCryptoTrustCrossSignedDevices
|
||||
*
|
||||
* @param val - True to trust cross-signed devices
|
||||
*
|
||||
* @deprecated Prefer {@link CryptoApi.setTrustCrossSignedDevices | `CryptoApi.setTrustCrossSignedDevices`}.
|
||||
*/
|
||||
public setCryptoTrustCrossSignedDevices(val: boolean): void {
|
||||
if (!this.crypto) {
|
||||
if (!this.cryptoBackend) {
|
||||
throw new Error("End-to-end encryption disabled");
|
||||
}
|
||||
this.crypto.setCryptoTrustCrossSignedDevices(val);
|
||||
this.cryptoBackend.setTrustCrossSignedDevices(val);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user