diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index e04262999..a35b838ba 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -4396,12 +4396,12 @@ export class BaileysStartupService extends ChannelStartupService { const msg = m?.message ? m : ((await this.getMessage(m.key, true)) as proto.IWebMessageInfo); - if (!msg) { + if (!msg?.message) { throw 'Message not found'; } for (const subtype of MessageSubtype) { - if (msg.message[subtype]) { + if (msg.message[subtype]?.message) { msg.message = msg.message[subtype].message; } }