1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-07 23:02:56 +03:00

Clean up typescript types related to rust crypto (#4706)

* Simplify bootstrapSecretStorage logic

might as well just export the keys immediately, rather than having multiple
tests.

* Clean up typescript types related to rust crypto

A forthcoming release of matrix-rust-sdk-crypto-wasm tightens up a number of
typescript types. In preparation, we need to get our house in order too.
This commit is contained in:
Richard van der Hoff
2025-02-11 13:22:27 +01:00
committed by GitHub
parent 33648a711c
commit 554804cd10
10 changed files with 38 additions and 43 deletions

View File

@@ -126,6 +126,7 @@ describe("RoomEncryptor", () => {
mockOlmMachine.shareRoomKey.mockImplementationOnce(async () => {
insideOlmShareRoom.resolve();
await deferredShare.promise;
return [];
});
roomEncryptor.prepareForEncryption(false, defaultDevicesIsolationMode);
@@ -151,7 +152,7 @@ describe("RoomEncryptor", () => {
const firstTargetMembers = defer<void>();
const secondTargetMembers = defer<void>();
mockOlmMachine.shareRoomKey.mockResolvedValue(undefined);
mockOlmMachine.shareRoomKey.mockResolvedValue([]);
// Hook into this method to demonstrate the race condition
mockRoom.getEncryptionTargetMembers
@@ -265,6 +266,7 @@ describe("RoomEncryptor", () => {
capturedSettings = undefined;
mockOlmMachine.shareRoomKey.mockImplementationOnce(async (roomId, users, encryptionSettings) => {
capturedSettings = encryptionSettings.sharingStrategy;
return [];
});
});