mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-26 10:28:38 -06:00
Update typebot.service.ts
This commit is contained in:
parent
5202060812
commit
48e7a410a2
@ -99,7 +99,6 @@ export class TypebotService {
|
||||
const remoteJid = data.remoteJid;
|
||||
const url = data.url;
|
||||
const typebot = data.typebot;
|
||||
// linha incluida por Francis:
|
||||
const enabled_typebot = data.enabled_typebot;
|
||||
const variables = data.variables;
|
||||
const findTypebot = await this.find(instance);
|
||||
@ -117,7 +116,7 @@ export class TypebotService {
|
||||
variables.forEach((variable) => {
|
||||
prefilledVariables[variable.name] = variable.value;
|
||||
});
|
||||
// linha incluida por Francis:
|
||||
|
||||
if (enabled_typebot !== false ) {
|
||||
|
||||
let enabled_typebot = true;
|
||||
@ -125,7 +124,6 @@ export class TypebotService {
|
||||
|
||||
const response = await this.createNewSession(instance, {
|
||||
url: url,
|
||||
// linha incluida por Francis
|
||||
enabled_typebot: enabled_typebot,
|
||||
typebot: typebot,
|
||||
remoteJid: remoteJid,
|
||||
@ -150,7 +148,6 @@ const response = await this.createNewSession(instance, {
|
||||
this.waMonitor.waInstances[instance.instanceName].sendDataWebhook(Events.TYPEBOT_START, {
|
||||
remoteJid: remoteJid,
|
||||
url: url,
|
||||
// linha incluida por Francis:
|
||||
enabled_typebot: enabled_typebot,
|
||||
typebot: typebot,
|
||||
prefilledVariables: prefilledVariables,
|
||||
@ -193,15 +190,10 @@ const id = Math.floor(Math.random() * 10000000000).toString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ate aqui
|
||||
|
||||
return {
|
||||
typebot: {
|
||||
...instance,
|
||||
typebot: {
|
||||
// linha incluida por Francis:
|
||||
enabled_typebot: enabled_typebot,
|
||||
url: url,
|
||||
remoteJid: remoteJid,
|
||||
@ -281,8 +273,6 @@ const id = Math.floor(Math.random() * 10000000000).toString();
|
||||
});
|
||||
|
||||
const typebotData = {
|
||||
// linha incluida por Francis new 4:
|
||||
// enabled: data.enabled_typebot,
|
||||
enabled: true,
|
||||
url: data.url,
|
||||
typebot: data.typebot,
|
||||
@ -521,6 +511,7 @@ const id = Math.floor(Math.random() * 10000000000).toString();
|
||||
});
|
||||
|
||||
const typebotData = {
|
||||
enabled: true,
|
||||
url: url,
|
||||
typebot: typebot,
|
||||
expire: expire,
|
||||
|
Loading…
Reference in New Issue
Block a user