@@ -59,7 +59,6 @@ import { BeaconEvent } from "./models/beacon.ts";
59
59
import { IEventsResponse } from "./@types/requests.ts" ;
60
60
import { UNREAD_THREAD_NOTIFICATIONS } from "./@types/sync.ts" ;
61
61
import { Feature , ServerSupport } from "./feature.ts" ;
62
- import { Crypto } from "./crypto/index.ts" ;
63
62
import { KnownMembership } from "./@types/membership.ts" ;
64
63
65
64
const DEBUG = true ;
@@ -116,13 +115,6 @@ function debuglog(...params: any[]): void {
116
115
* Options passed into the constructor of SyncApi by MatrixClient
117
116
*/
118
117
export interface SyncApiOptions {
119
- /**
120
- * Crypto manager
121
- *
122
- * @deprecated in favour of cryptoCallbacks
123
- */
124
- crypto ?: Crypto ;
125
-
126
118
/**
127
119
* If crypto is enabled on our client, callbacks into the crypto module
128
120
*/
@@ -642,9 +634,6 @@ export class SyncApi {
642
634
}
643
635
this . opts . filter . setLazyLoadMembers ( true ) ;
644
636
}
645
- if ( this . opts . lazyLoadMembers ) {
646
- this . syncOpts . crypto ?. enableLazyLoading ( ) ;
647
- }
648
637
} ;
649
638
650
639
private storeClientOptions = async ( ) : Promise < void > => {
@@ -880,12 +869,6 @@ export class SyncApi {
880
869
catchingUp : this . catchingUp ,
881
870
} ;
882
871
883
- if ( this . syncOpts . crypto ) {
884
- // tell the crypto module we're about to process a sync
885
- // response
886
- await this . syncOpts . crypto . onSyncWillProcess ( syncEventData ) ;
887
- }
888
-
889
872
try {
890
873
await this . processSyncResponse ( syncEventData , data ) ;
891
874
} catch ( e ) {
@@ -920,15 +903,6 @@ export class SyncApi {
920
903
this . updateSyncState ( SyncState . Syncing , syncEventData ) ;
921
904
922
905
if ( this . client . store . wantsSave ( ) ) {
923
- // We always save the device list (if it's dirty) before saving the sync data:
924
- // this means we know the saved device list data is at least as fresh as the
925
- // stored sync data which means we don't have to worry that we may have missed
926
- // device changes. We can also skip the delay since we're not calling this very
927
- // frequently (and we don't really want to delay the sync for it).
928
- if ( this . syncOpts . crypto ) {
929
- await this . syncOpts . crypto . saveDeviceList ( 0 ) ;
930
- }
931
-
932
906
// tell databases that everything is now in a consistent state and can be saved.
933
907
await this . client . store . save ( ) ;
934
908
}
0 commit comments