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

Element-R: Wire up globalBlacklistUnverifiedDevices field to rust crypto encryption settings (#3790)

* Wire up `globalBlacklistUnverifiedDevices` rust crypto encrypted settings

* Improve test comment

* Update comments

* Review changes

* Fix lint due to merge
This commit is contained in:
Florian Duros
2023-10-26 15:57:37 +02:00
committed by GitHub
parent 07a9eb3c96
commit ce7b7bf44f
3 changed files with 50 additions and 6 deletions

View File

@@ -282,7 +282,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
throw new Error(`Cannot encrypt event in unconfigured room ${roomId}`);
}
await encryptor.encryptEvent(event);
await encryptor.encryptEvent(event, this.globalBlacklistUnverifiedDevices);
}
public async decryptEvent(event: MatrixEvent): Promise<IEventDecryptionResult> {
@@ -376,7 +376,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
const encryptor = this.roomEncryptors[room.roomId];
if (encryptor) {
encryptor.ensureEncryptionSession();
encryptor.ensureEncryptionSession(this.globalBlacklistUnverifiedDevices);
}
}