feat: add "receivedInitialSync" connection update

This commit is contained in:
Adhiraj Singh
2022-08-19 10:48:27 +05:30
parent ebd92e0337
commit c76c2afa0c
5 changed files with 18 additions and 17 deletions

View File

@@ -41,6 +41,9 @@ export const makeChatsSocket = (config: SocketConfig) => {
'doing initial app state sync'
)
await resyncMainAppState(recvChats)
const accountSyncCounter = (authState.creds.accountSyncCounter || 0) + 1
ev.emit('creds.update', { accountSyncCounter })
} else {
logger.warn('connection closed before app state sync')
}