1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-04 05:02:41 +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

@@ -1453,6 +1453,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
protected buildSyncApiOptions(): SyncApiOptions {
return {
crypto: this.crypto,
cryptoCallbacks: this.cryptoBackend,
canResetEntireTimeline: (roomId: string): boolean => {
if (!this.canResetTimelineCallback) {
return false;