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
99f423d426
commit
6798bd861e
@ -182,14 +182,6 @@ export class TypebotService {
|
|||||||
if (startSession) {
|
if (startSession) {
|
||||||
const newSessions = await this.clearSessions(instance, remoteJid);
|
const newSessions = await this.clearSessions(instance, remoteJid);
|
||||||
|
|
||||||
const prefilledVariables = {
|
|
||||||
...data.prefilledVariables,
|
|
||||||
remoteJid: data.remoteJid,
|
|
||||||
pushName: data.pushName || '',
|
|
||||||
messageType: msg.type,
|
|
||||||
instanceName: instance.instanceName,
|
|
||||||
};
|
|
||||||
|
|
||||||
const response = await this.createNewSession(instance, {
|
const response = await this.createNewSession(instance, {
|
||||||
enabled: findTypebot.enabled,
|
enabled: findTypebot.enabled,
|
||||||
url: url,
|
url: url,
|
||||||
@ -650,12 +642,6 @@ export class TypebotService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const prefilledVariables = {
|
|
||||||
remoteJid: remoteJid,
|
|
||||||
pushName: pushName,
|
|
||||||
messageType: msg.type,
|
|
||||||
};
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const version = this.configService.get<Typebot>('TYPEBOT').API_VERSION;
|
const version = this.configService.get<Typebot>('TYPEBOT').API_VERSION;
|
||||||
let urlTypebot: string;
|
let urlTypebot: string;
|
||||||
@ -709,7 +695,6 @@ export class TypebotService {
|
|||||||
sessions: sessions,
|
sessions: sessions,
|
||||||
remoteJid: remoteJid,
|
remoteJid: remoteJid,
|
||||||
pushName: msg.pushName,
|
pushName: msg.pushName,
|
||||||
prefilledVariables: prefilledVariables,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.sendWAMessage(instance, remoteJid, data.messages, data.input, data.clientSideActions);
|
await this.sendWAMessage(instance, remoteJid, data.messages, data.input, data.clientSideActions);
|
||||||
|
Loading…
Reference in New Issue
Block a user