mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: reduce logging
This commit is contained in:
@@ -724,7 +724,7 @@ export const processSyncAction = (
|
|||||||
ev.emit('chats.delete', [id])
|
ev.emit('chats.delete', [id])
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger?.warn({ syncAction, id }, 'unprocessable update')
|
logger?.debug({ syncAction, id }, 'unprocessable update')
|
||||||
}
|
}
|
||||||
|
|
||||||
function isValidPatchBasedOnMessageRange(id: string, msgRange: proto.SyncActionValue.ISyncActionMessageRange | null | undefined) {
|
function isValidPatchBasedOnMessageRange(id: string, msgRange: proto.SyncActionValue.ISyncActionMessageRange | null | undefined) {
|
||||||
|
|||||||
@@ -133,14 +133,20 @@ const processMessage = async(
|
|||||||
let newAppStateSyncKeyId = ''
|
let newAppStateSyncKeyId = ''
|
||||||
await keyStore.transaction(
|
await keyStore.transaction(
|
||||||
async() => {
|
async() => {
|
||||||
|
const newKeys: string[] = []
|
||||||
for(const { keyData, keyId } of keys) {
|
for(const { keyData, keyId } of keys) {
|
||||||
const strKeyId = Buffer.from(keyId!.keyId!).toString('base64')
|
const strKeyId = Buffer.from(keyId!.keyId!).toString('base64')
|
||||||
|
newKeys.push(strKeyId)
|
||||||
|
|
||||||
logger?.info({ strKeyId }, 'injecting new app state sync key')
|
|
||||||
await keyStore.set({ 'app-state-sync-key': { [strKeyId]: keyData! } })
|
await keyStore.set({ 'app-state-sync-key': { [strKeyId]: keyData! } })
|
||||||
|
|
||||||
newAppStateSyncKeyId = strKeyId
|
newAppStateSyncKeyId = strKeyId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger?.info(
|
||||||
|
{ newAppStateSyncKeyId, newKeys },
|
||||||
|
'injecting new app state sync keys'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user