From 2cc5cc2dd4424b4aeed700f62b4b59e6a3e3856e Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Tue, 12 Apr 2022 17:08:10 +0530 Subject: [PATCH] Revert "feat: resync main app state on first open" This reverts commit 060c838707701d03c9d54f993f3c0d30c79e4f17. --- src/Socket/chats.ts | 4 ---- src/Types/Auth.ts | 1 - src/Utils/auth-utils.ts | 3 +-- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Socket/chats.ts b/src/Socket/chats.ts index 3f925ed..381577b 100644 --- a/src/Socket/chats.ts +++ b/src/Socket/chats.ts @@ -614,10 +614,6 @@ export const makeChatsSocket = (config: SocketConfig) => { fetchPrivacySettings(), sendPresenceUpdate('available') ]) - if(!authState.creds.didInitialAppStateSync) { - await resyncMainAppState() - ev.emit('creds.update', { didInitialAppStateSync: true }) - } } ws.on('CB:presence', handlePresenceUpdate) diff --git a/src/Types/Auth.ts b/src/Types/Auth.ts index 87b7cb6..7e1c9c7 100644 --- a/src/Types/Auth.ts +++ b/src/Types/Auth.ts @@ -46,7 +46,6 @@ export type AuthenticationCreds = SignalCreds & { lastAccountSyncTimestamp?: number accountSettings: AccountSettings - didInitialAppStateSync: boolean } export type SignalDataTypeMap = { diff --git a/src/Utils/auth-utils.ts b/src/Utils/auth-utils.ts index baa1a66..664c1f4 100644 --- a/src/Utils/auth-utils.ts +++ b/src/Utils/auth-utils.ts @@ -111,8 +111,7 @@ export const initAuthCreds = (): AuthenticationCreds => { serverHasPreKeys: false, accountSettings: { unarchiveChats: false - }, - didInitialAppStateSync: false + } } }