Skip to content

Commit 1fd6675

Browse files
committed
Update crypto wasm for breaking changes
See https://github.com/matrix-org/matrix-rust-sdk-crypto-wasm/releases/tag/v8.0.0 for how this was mapped from the previous API.
1 parent f8d4161 commit 1fd6675

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/rust-crypto/RoomEncryptor.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,8 @@ export class RoomEncryptor {
254254
// When this.room.getBlacklistUnverifiedDevices() === null, the global settings should be used
255255
// See Room#getBlacklistUnverifiedDevices
256256
if (this.room.getBlacklistUnverifiedDevices() ?? globalBlacklistUnverifiedDevices) {
257-
// TODO XXX : CONFIRM THIS WITH CRYPTO TEAM BEFORE LANDING PR
258-
rustEncryptionSettings.sharingStrategy = CollectStrategy.deviceBasedStrategy(true, true);
257+
rustEncryptionSettings.sharingStrategy = CollectStrategy.deviceBasedStrategy(true, false);
259258
} else {
260-
// TODO XXX : CONFIRM THIS WITH CRYPTO TEAM BEFORE LANDING PR
261259
rustEncryptionSettings.sharingStrategy = CollectStrategy.deviceBasedStrategy(false, false);
262260
}
263261

src/rust-crypto/rust-crypto.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,6 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
14061406

14071407
/** called by the sync loop after processing each sync.
14081408
*
1409-
* TODO: figure out something equivalent for sliding sync.
14101409
*
14111410
* @param syncState - information on the completed sync.
14121411
*/
@@ -1418,6 +1417,13 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
14181417
});
14191418
}
14201419

1420+
/**
1421+
* Implementation of {@link CryptoApi#markAllTrackedUsersAsDirty}.
1422+
*/
1423+
public async markAllTrackedUsersAsDirty(): Promise<void> {
1424+
await this.olmMachine.markAllTrackedUsersAsDirty();
1425+
}
1426+
14211427
/**
14221428
* Handle an incoming m.key.verification.request event, received either in-room or in a to-device message.
14231429
*
@@ -1742,6 +1748,7 @@ class EventDecryptor {
17421748
const res = (await this.olmMachine.decryptRoomEvent(
17431749
stringifyEvent(event),
17441750
new RustSdkCryptoJs.RoomId(event.getRoomId()!),
1751+
new RustSdkCryptoJs.DecryptionSettings(RustSdkCryptoJs.TrustRequirement.Untrusted),
17451752
)) as RustSdkCryptoJs.DecryptedRoomEvent;
17461753

17471754
// Success. We can remove the event from the pending list, if

0 commit comments

Comments
 (0)