mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 17:38:40 -06:00
fix: get message id for typebot
This commit is contained in:
parent
fa3306b0f4
commit
a8937bd8b1
@ -719,10 +719,13 @@ export class TypebotService {
|
|||||||
listResponseMessage: msg?.message?.listResponseMessage?.singleSelectReply?.selectedRowId,
|
listResponseMessage: msg?.message?.listResponseMessage?.singleSelectReply?.selectedRowId,
|
||||||
responseRowId: msg?.message?.listResponseMessage?.singleSelectReply?.selectedRowId,
|
responseRowId: msg?.message?.listResponseMessage?.singleSelectReply?.selectedRowId,
|
||||||
// Medias
|
// Medias
|
||||||
audioMessage: `audioMessage:${msg?.key?.id}`,
|
audioMessage: msg?.message?.audioMessage ? `audioMessage:${msg?.key?.id}` : undefined,
|
||||||
imageMessage: `imageMessage:${msg?.key?.id}`,
|
imageMessage: msg?.message?.imageMessage ? `imageMessage:${msg?.key?.id}` : undefined,
|
||||||
videoMessage: `videoMessage:${msg?.key?.id}`,
|
videoMessage: msg?.message?.videoMessage ? `videoMessage:${msg?.key?.id}` : undefined,
|
||||||
documentMessage: `documentMessage:${msg?.key?.id}`,
|
documentMessage: msg?.message?.documentMessage ? `documentMessage:${msg?.key?.id}` : undefined,
|
||||||
|
documentWithCaptionMessage: msg?.message?.auddocumentWithCaptionMessageioMessage
|
||||||
|
? `documentWithCaptionMessage:${msg?.key?.id}`
|
||||||
|
: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
const messageType = Object.keys(types).find((key) => types[key] !== undefined) || 'unknown';
|
const messageType = Object.keys(types).find((key) => types[key] !== undefined) || 'unknown';
|
||||||
|
@ -1173,6 +1173,10 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
|
|
||||||
this.sendDataWebhook(Events.MESSAGES_UPSERT, messageRaw);
|
this.sendDataWebhook(Events.MESSAGES_UPSERT, messageRaw);
|
||||||
|
|
||||||
|
await this.prismaRepository.message.create({
|
||||||
|
data: messageRaw,
|
||||||
|
});
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.configService.get<Chatwoot>('CHATWOOT').ENABLED &&
|
this.configService.get<Chatwoot>('CHATWOOT').ENABLED &&
|
||||||
this.localChatwoot.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({
|
const contact = await this.prismaRepository.contact.findFirst({
|
||||||
where: { remoteJid: received.key.remoteJid, instanceId: this.instanceId },
|
where: { remoteJid: received.key.remoteJid, instanceId: this.instanceId },
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user