Skip to content

Commit ef75742

Browse files
message recorded for no media messages
1 parent d797d81 commit ef75742

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/api/integrations/channel/meta/whatsapp.business.service.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,11 @@ export class BusinessStartupService extends ChannelStartupService {
504504
}
505505
}
506506

507-
await this.prismaRepository.message.create({
508-
data: messageRaw,
509-
});
507+
if (!this.isMediaMessage(received?.messages[0])) {
508+
await this.prismaRepository.message.create({
509+
data: messageRaw,
510+
});
511+
}
510512

511513
const contact = await this.prismaRepository.contact.findFirst({
512514
where: { instanceId: this.instanceId, remoteJid: key.remoteJid },

0 commit comments

Comments
 (0)