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 remoteJid = data.remoteJid;
|
||||||
const url = data.url;
|
const url = data.url;
|
||||||
const typebot = data.typebot;
|
const typebot = data.typebot;
|
||||||
// linha incluida por Francis:
|
|
||||||
const enabled_typebot = data.enabled_typebot;
|
const enabled_typebot = data.enabled_typebot;
|
||||||
const variables = data.variables;
|
const variables = data.variables;
|
||||||
const findTypebot = await this.find(instance);
|
const findTypebot = await this.find(instance);
|
||||||
@ -117,7 +116,7 @@ export class TypebotService {
|
|||||||
variables.forEach((variable) => {
|
variables.forEach((variable) => {
|
||||||
prefilledVariables[variable.name] = variable.value;
|
prefilledVariables[variable.name] = variable.value;
|
||||||
});
|
});
|
||||||
// linha incluida por Francis:
|
|
||||||
if (enabled_typebot !== false ) {
|
if (enabled_typebot !== false ) {
|
||||||
|
|
||||||
let enabled_typebot = true;
|
let enabled_typebot = true;
|
||||||
@ -125,7 +124,6 @@ export class TypebotService {
|
|||||||
|
|
||||||
const response = await this.createNewSession(instance, {
|
const response = await this.createNewSession(instance, {
|
||||||
url: url,
|
url: url,
|
||||||
// linha incluida por Francis
|
|
||||||
enabled_typebot: enabled_typebot,
|
enabled_typebot: enabled_typebot,
|
||||||
typebot: typebot,
|
typebot: typebot,
|
||||||
remoteJid: remoteJid,
|
remoteJid: remoteJid,
|
||||||
@ -150,7 +148,6 @@ const response = await this.createNewSession(instance, {
|
|||||||
this.waMonitor.waInstances[instance.instanceName].sendDataWebhook(Events.TYPEBOT_START, {
|
this.waMonitor.waInstances[instance.instanceName].sendDataWebhook(Events.TYPEBOT_START, {
|
||||||
remoteJid: remoteJid,
|
remoteJid: remoteJid,
|
||||||
url: url,
|
url: url,
|
||||||
// linha incluida por Francis:
|
|
||||||
enabled_typebot: enabled_typebot,
|
enabled_typebot: enabled_typebot,
|
||||||
typebot: typebot,
|
typebot: typebot,
|
||||||
prefilledVariables: prefilledVariables,
|
prefilledVariables: prefilledVariables,
|
||||||
@ -193,15 +190,10 @@ const id = Math.floor(Math.random() * 10000000000).toString();
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ate aqui
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
typebot: {
|
typebot: {
|
||||||
...instance,
|
...instance,
|
||||||
typebot: {
|
typebot: {
|
||||||
// linha incluida por Francis:
|
|
||||||
enabled_typebot: enabled_typebot,
|
enabled_typebot: enabled_typebot,
|
||||||
url: url,
|
url: url,
|
||||||
remoteJid: remoteJid,
|
remoteJid: remoteJid,
|
||||||
@ -281,8 +273,6 @@ const id = Math.floor(Math.random() * 10000000000).toString();
|
|||||||
});
|
});
|
||||||
|
|
||||||
const typebotData = {
|
const typebotData = {
|
||||||
// linha incluida por Francis new 4:
|
|
||||||
// enabled: data.enabled_typebot,
|
|
||||||
enabled: true,
|
enabled: true,
|
||||||
url: data.url,
|
url: data.url,
|
||||||
typebot: data.typebot,
|
typebot: data.typebot,
|
||||||
@ -521,6 +511,7 @@ const id = Math.floor(Math.random() * 10000000000).toString();
|
|||||||
});
|
});
|
||||||
|
|
||||||
const typebotData = {
|
const typebotData = {
|
||||||
|
enabled: true,
|
||||||
url: url,
|
url: url,
|
||||||
typebot: typebot,
|
typebot: typebot,
|
||||||
expire: expire,
|
expire: expire,
|
||||||
|
Loading…
Reference in New Issue
Block a user