feat(history): add proper logging support for history sync debugging

- Add optional ILogger parameter to processHistoryMessage and
  downloadAndProcessHistorySyncNotification functions
- Add trace-level logging with syncType and progress for debugging
- Preserve all existing imports and LID-PN extraction functionality
- Enhanced JSDoc documentation with detailed parameter descriptions

This enables trace-level visibility into history sync processing,
helping debug issues with message synchronization and LID mappings.
This commit is contained in:
Claude
2026-01-22 19:24:36 +00:00
parent 4a3d8e9e46
commit 5d97e170d2
2 changed files with 17 additions and 5 deletions
+1 -1
View File
@@ -320,7 +320,7 @@ const processMessage = async (
})
}
const data = await downloadAndProcessHistorySyncNotification(histNotification, options)
const data = await downloadAndProcessHistorySyncNotification(histNotification, options, logger)
// Emit LID-PN mappings from history sync
// This is how WhatsApp Web learns mappings for chats with non-contacts