mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: remove redundant newMutations log
This commit is contained in:
@@ -370,7 +370,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
// only process if there are syncd patches
|
// only process if there are syncd patches
|
||||||
if(patches.length) {
|
if(patches.length) {
|
||||||
const { newMutations, state: newState } = await decodePatches(
|
const { state: newState } = await decodePatches(
|
||||||
name,
|
name,
|
||||||
patches,
|
patches,
|
||||||
states[name],
|
states[name],
|
||||||
@@ -383,9 +383,6 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
await authState.keys.set({ 'app-state-sync-version': { [name]: newState } })
|
await authState.keys.set({ 'app-state-sync-version': { [name]: newState } })
|
||||||
|
|
||||||
logger.info(`synced ${name} to v${newState.version}`)
|
logger.info(`synced ${name} to v${newState.version}`)
|
||||||
if(newMutations.length) {
|
|
||||||
logger.trace({ newMutations, name }, 'recv new mutations')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(hasMorePatches) {
|
if(hasMorePatches) {
|
||||||
|
|||||||
@@ -415,7 +415,6 @@ export const decodePatches = async(
|
|||||||
validateMacs: boolean = true
|
validateMacs: boolean = true
|
||||||
) => {
|
) => {
|
||||||
syncds = [...syncds]
|
syncds = [...syncds]
|
||||||
const successfulMutations: ChatMutation[] = []
|
|
||||||
|
|
||||||
const newState: LTHashState = {
|
const newState: LTHashState = {
|
||||||
...initial,
|
...initial,
|
||||||
@@ -461,10 +460,7 @@ export const decodePatches = async(
|
|||||||
syncds.splice(0, 1)
|
syncds.splice(0, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return { state: newState }
|
||||||
newMutations: successfulMutations,
|
|
||||||
state: newState
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const chatModificationToAppPatch = (
|
export const chatModificationToAppPatch = (
|
||||||
@@ -620,10 +616,13 @@ export const processSyncAction = (
|
|||||||
const isInitialSync = !!initialSyncOpts
|
const isInitialSync = !!initialSyncOpts
|
||||||
const accountSettings = initialSyncOpts?.accountSettings
|
const accountSettings = initialSyncOpts?.accountSettings
|
||||||
|
|
||||||
|
logger?.trace({ syncAction, initialSync: !!initialSyncOpts }, 'processing sync action')
|
||||||
|
|
||||||
const {
|
const {
|
||||||
syncAction: { value: action },
|
syncAction: { value: action },
|
||||||
index: [type, id, msgId, fromMe]
|
index: [type, id, msgId, fromMe]
|
||||||
} = syncAction
|
} = syncAction
|
||||||
|
|
||||||
if(action?.muteAction) {
|
if(action?.muteAction) {
|
||||||
ev.emit(
|
ev.emit(
|
||||||
'chats.update',
|
'chats.update',
|
||||||
|
|||||||
Reference in New Issue
Block a user