Skip to content

Commit bc11d0f

Browse files
committed
fix: corrigido delete de mensagem quando nao salvo no banco de dados
1 parent a62f9eb commit bc11d0f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3447,6 +3447,7 @@ export class BaileysStartupService extends ChannelStartupService {
34473447
await this.prismaRepository.messageUpdate.create({ data: messageUpdate });
34483448
}
34493449
} else {
3450+
if (!message) return response;
34503451
await this.prismaRepository.message.deleteMany({ where: { id: message.id } });
34513452
}
34523453
this.sendDataWebhook(Events.MESSAGES_DELETE, {

0 commit comments

Comments
 (0)