mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-29 11:56:28 -06:00
Update typebot.service.ts
This commit is contained in:
parent
b993b7075c
commit
a85971c390
@ -171,7 +171,6 @@ export class TypebotService {
|
|||||||
const prefilledVariables = {
|
const prefilledVariables = {
|
||||||
remoteJid: remoteJid,
|
remoteJid: remoteJid,
|
||||||
instanceName: instance.instanceName,
|
instanceName: instance.instanceName,
|
||||||
messageType: this.messageType,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (variables?.length) {
|
if (variables?.length) {
|
||||||
@ -281,11 +280,9 @@ export class TypebotService {
|
|||||||
documentMessage: msg.documentMessage?.fileName,
|
documentMessage: msg.documentMessage?.fileName,
|
||||||
contactMessage: msg.contactMessage?.displayName,
|
contactMessage: msg.contactMessage?.displayName,
|
||||||
locationMessage: msg.locationMessage?.degreesLatitude,
|
locationMessage: msg.locationMessage?.degreesLatitude,
|
||||||
viewOnceMessageV2: msg.viewOnceMessageV2?.message?.videoMessage?.url,
|
viewOnceMessageV2: msg.viewOnceMessageV2?.message?.imageMessage?.url,
|
||||||
listResponseMessage: msg.listResponseMessage?.singleSelectReply?.selectedRowId,
|
listResponseMessage: msg.listResponseMessage?.singleSelectReply?.selectedRowId,
|
||||||
responseRowId: msg.listResponseMessage?.singleSelectReply?.selectedRowId,
|
responseRowId: msg.listResponseMessage?.singleSelectReply?.selectedRowId,
|
||||||
// Adiciona uma nova propriedade messageType para identificar o tipo da mensagem
|
|
||||||
//messageType: Object.keys(types).find(key => types[key] !== undefined) || 'unknown'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.logger.verbose('type message: ' + JSON.stringify(types));
|
this.logger.verbose('type message: ' + JSON.stringify(types));
|
||||||
@ -293,9 +290,6 @@ export class TypebotService {
|
|||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtém os tipos de mensagem e o tipo identificado
|
|
||||||
//const messageType = this.getTypeMessage(msg.message);
|
|
||||||
|
|
||||||
private getMessageContent(types: any) {
|
private getMessageContent(types: any) {
|
||||||
this.logger.verbose('get message content');
|
this.logger.verbose('get message content');
|
||||||
const typeKey = Object.keys(types).find((key) => types[key] !== undefined);
|
const typeKey = Object.keys(types).find((key) => types[key] !== undefined);
|
||||||
|
Loading…
Reference in New Issue
Block a user