mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: account for no initial state while patching
This commit is contained in:
@@ -522,7 +522,10 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
logger.debug({ patch: patchCreate }, 'applying app patch')
|
||||
|
||||
await resyncAppState([name])
|
||||
const { [name]: initial } = await authState.keys.get('app-state-sync-version', [name])
|
||||
|
||||
let { [name]: initial } = await authState.keys.get('app-state-sync-version', [name])
|
||||
initial = initial || newLTHashState()
|
||||
|
||||
const { patch, state } = await encodeSyncdPatch(
|
||||
patchCreate,
|
||||
myAppStateKeyId,
|
||||
|
||||
Reference in New Issue
Block a user