From 419300b31f243257d3df8c027a018f41e992003f Mon Sep 17 00:00:00 2001 From: Willian Coqueiro Date: Thu, 17 Jul 2025 02:24:21 +0000 Subject: [PATCH] refactor: simplify edited message check in BaileysStartupService --- .../integrations/channel/whatsapp/whatsapp.baileys.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index 09e68bb7..477d85b8 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -1078,7 +1078,7 @@ export class BaileysStartupService extends ChannelStartupService { const editedMessage = received?.message?.protocolMessage || received?.message?.editedMessage?.message?.protocolMessage; - if (received.message?.protocolMessage?.editedMessage && editedMessage) { + if (editedMessage) { if (this.configService.get('CHATWOOT').ENABLED && this.localChatwoot?.enabled) this.chatwootService.eventWhatsapp( 'messages.edit', @@ -1126,7 +1126,7 @@ export class BaileysStartupService extends ChannelStartupService { if ( (type !== 'notify' && type !== 'append') || - received.message?.protocolMessage || + editedMessage || received.message?.pollUpdateMessage || !received?.message ) {