mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
refactor: use only "getAppStateSyncKey" in syncd patch
This commit is contained in:
@@ -211,7 +211,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
const name = key as WAPatchName
|
||||
// only process if there are syncd patches
|
||||
if(decoded[name].length) {
|
||||
const { newMutations, state: newState } = await decodePatches(name, decoded[name], states[name], authState, true)
|
||||
const { newMutations, state: newState } = await decodePatches(name, decoded[name], states[name], authState.keys.getAppStateSyncKey, true)
|
||||
|
||||
await authState.keys.setAppStateSyncVersion(name, newState)
|
||||
|
||||
@@ -387,7 +387,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
)
|
||||
const initial = await authState.keys.getAppStateSyncVersion(name)
|
||||
// temp: verify it was encoded correctly
|
||||
const result = await decodePatches(name, [{ ...patch, version: { version: state.version }, }], initial, authState)
|
||||
const result = await decodePatches(name, [{ ...patch, version: { version: state.version }, }], initial, authState.keys.getAppStateSyncKey)
|
||||
|
||||
const node: BinaryNode = {
|
||||
tag: 'iq',
|
||||
|
||||
Reference in New Issue
Block a user