From 049b179b5d77c2aad88a262890425fefd9af6e7a Mon Sep 17 00:00:00 2001 From: Wahyu Saputra Date: Mon, 8 Dec 2025 10:35:42 +0700 Subject: [PATCH] fix(whatsapp): silence 'Parent message not found' warning to prevent log flood during history sync --- CHANGELOG.md | 1 + .../channel/whatsapp/whatsapp.baileys.service.ts | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bb494b94..a01e43fb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Widget Works Modification +* [WIDGET-WORKS] Silence "Parent message not found" warnings during history sync to prevent CPU overload and subsequent 401 disconnects. * [WIDGET-WORKS] Fix `PrismaClientValidationError` in `messages.update` (missing `Message` relation) by guarding `messageUpdate.create` calls. * [WIDGET-WORKS] Guard `messages.update` cache cleanup with a derived key and optional `MESSAGE_UPDATE_CACHE_DELETE_DISABLED` flag to prevent cache.delete crash-loops. * [WIDGET-WORKS] Save messages before Chatwoot sync in `/message/sendText` to avoid missing `chatwootMessageId` and log async sync failures. diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index ac221411f..4a00db20d 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -1565,9 +1565,10 @@ export class BaileysStartupService extends ChannelStartupService { if (message.messageId) { await this.prismaRepository.messageUpdate.create({ data: message }); } else { - this.logger.warn( - `[WIDGET-WORKS] Skipping messageUpdate.create for key ${key.id}: Parent message not found.`, - ); + // [WIDGET-WORKS] Silenced warning to prevent log flood during history sync + // this.logger.warn( + // `[WIDGET-WORKS] Skipping messageUpdate.create for key ${key.id}: Parent message not found.`, + // ); } }