fix: corrigido delete de mensagem quando nao salvo no banco de dados

This commit is contained in:
William Dumes 2025-07-31 17:27:06 -03:00
parent a62f9ebe46
commit bc11d0f751

View File

@ -3447,6 +3447,7 @@ export class BaileysStartupService extends ChannelStartupService {
await this.prismaRepository.messageUpdate.create({ data: messageUpdate }); await this.prismaRepository.messageUpdate.create({ data: messageUpdate });
} }
} else { } else {
if (!message) return response;
await this.prismaRepository.message.deleteMany({ where: { id: message.id } }); await this.prismaRepository.message.deleteMany({ where: { id: message.id } });
} }
this.sendDataWebhook(Events.MESSAGES_DELETE, { this.sendDataWebhook(Events.MESSAGES_DELETE, {