fix: get message id for typebot

This commit is contained in:
Davidson Gomes
2024-06-10 18:32:05 -03:00
parent fa3306b0f4
commit a8937bd8b1
2 changed files with 11 additions and 8 deletions

View File

@@ -1173,6 +1173,10 @@ export class BaileysStartupService extends ChannelStartupService {
this.sendDataWebhook(Events.MESSAGES_UPSERT, messageRaw);
await this.prismaRepository.message.create({
data: messageRaw,
});
if (
this.configService.get<Chatwoot>('CHATWOOT').ENABLED &&
this.localChatwoot.enabled &&
@@ -1202,10 +1206,6 @@ export class BaileysStartupService extends ChannelStartupService {
}
}
await this.prismaRepository.message.create({
data: messageRaw,
});
const contact = await this.prismaRepository.contact.findFirst({
where: { remoteJid: received.key.remoteJid, instanceId: this.instanceId },
});