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

Pass CryptoBackend into SyncApi (#3010)

I need to start calling back into the new rust crypto implementation from the /sync loops, so I need to pass it into SyncApi. To reduce the coupling, I've defined a new interface specifying the methods which exist for that purpose. Currently it's only onSyncCompleted.
This commit is contained in:
Richard van der Hoff
2023-01-03 15:37:51 +00:00
committed by GitHub
parent cef5507ab1
commit 7c34deecb6
6 changed files with 51 additions and 8 deletions

View File

@ -119,7 +119,7 @@ describe("SlidingSyncSdk", () => {
if (testOpts.withCrypto) {
httpBackend!.when("GET", "/room_keys/version").respond(404, {});
await client!.initCrypto();
syncOpts.crypto = client!.crypto;
syncOpts.cryptoCallbacks = syncOpts.crypto = client!.crypto;
}
httpBackend!.when("GET", "/_matrix/client/r0/pushrules").respond(200, {});
sdk = new SlidingSyncSdk(mockSlidingSync, client, testOpts, syncOpts);