From bc11d0f751f68816db68a46788c6821d7328de2f Mon Sep 17 00:00:00 2001 From: William Dumes Date: Thu, 31 Jul 2025 17:27:06 -0300 Subject: [PATCH] fix: corrigido delete de mensagem quando nao salvo no banco de dados --- .../integrations/channel/whatsapp/whatsapp.baileys.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index 7d7da2be..8496a759 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -3447,6 +3447,7 @@ export class BaileysStartupService extends ChannelStartupService { await this.prismaRepository.messageUpdate.create({ data: messageUpdate }); } } else { + if (!message) return response; await this.prismaRepository.message.deleteMany({ where: { id: message.id } }); } this.sendDataWebhook(Events.MESSAGES_DELETE, {