feat: resync main app state on first open

This commit is contained in:
Adhiraj Singh
2022-04-08 23:29:36 +05:30
parent 850611e500
commit 060c838707
3 changed files with 7 additions and 1 deletions

View File

@@ -610,6 +610,10 @@ 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)