mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
refactor: more specific arguments for encode patch
This commit is contained in:
@@ -406,11 +406,13 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
await mutationMutex.mutex(
|
||||
async() => {
|
||||
await resyncAppState([name])
|
||||
const initial = await authState.keys.getAppStateSyncVersion(name)
|
||||
const { patch, state } = await encodeSyncdPatch(
|
||||
patchCreate,
|
||||
authState,
|
||||
authState.creds.myAppStateKeyId!,
|
||||
initial,
|
||||
authState.keys,
|
||||
)
|
||||
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.keys.getAppStateSyncKey)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user