From 36c620d4fd5d4da659beab72a8223a7677eed6db Mon Sep 17 00:00:00 2001 From: iscarelli Date: Thu, 25 Jun 2026 21:48:38 -0300 Subject: [PATCH] fix(cloud-api): guard contacts[0].profile.name to stop status webhooks from crashing --- src/api/integrations/channel/meta/whatsapp.business.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/integrations/channel/meta/whatsapp.business.service.ts b/src/api/integrations/channel/meta/whatsapp.business.service.ts index 1e4808c156..cb5b7d6d4a 100644 --- a/src/api/integrations/channel/meta/whatsapp.business.service.ts +++ b/src/api/integrations/channel/meta/whatsapp.business.service.ts @@ -387,7 +387,7 @@ export class BusinessStartupService extends ChannelStartupService { let messageRaw: any; let pushName: any; - if (received.contacts) pushName = received.contacts[0].profile.name; + if (received.contacts) pushName = received.contacts[0]?.profile?.name; if (received.messages) { const message = received.messages[0]; // Añadir esta línea para definir message