@bot-whatsapp/bot
Advanced tools
Comparing version 0.0.221-alpha.0 to 0.0.222-alpha.0
@@ -185,4 +185,4 @@ const { EventEmitter } = require('node:events') | ||
// 📄 Finalizar flujo | ||
const endFlowv2 = | ||
// 📄 Finalizar flujo (patch) | ||
const endFlowToGotoFlow = | ||
(flag) => | ||
@@ -192,13 +192,5 @@ async (messages = null, options = { fromGotoFlow: false, end: false }) => { | ||
endFlowFlag = true | ||
await state.update({'__end_flow__':true}) | ||
if (typeof messages === 'string' || messages === null) { | ||
await this.sendProviderAndSave(from, createCtxMessage(messages)) | ||
clearQueue() | ||
return | ||
} | ||
// Procesos de callback que se deben execute como exepciones | ||
if (Array.isArray(messages)) { | ||
for (const iteratorCtxMessage of messages) { | ||
const scopeCtx = await resolveCbEveryCtx(iteratorCtxMessage, { | ||
@@ -209,6 +201,3 @@ omitEndFlow: options.fromGotoFlow, | ||
}) | ||
if (scopeCtx?.endFlow) break | ||
// options.fromGotoFlow = false | ||
} | ||
@@ -224,3 +213,3 @@ } | ||
if (options.prev?.options?.capture) { | ||
if (options.prev?.options?.capture && !options.prev?.options?.idle) { | ||
await cbEveryCtx(options.prev?.ref) | ||
@@ -344,3 +333,3 @@ } | ||
await endFlowv2(flag)(promises, { fromGotoFlow: true, ...{ end: endFlowFlag } }) | ||
await endFlowToGotoFlow(flag)(promises, { fromGotoFlow: true, ...{ end: endFlowFlag } }) | ||
return | ||
@@ -400,2 +389,3 @@ } | ||
) | ||
return | ||
} | ||
@@ -402,0 +392,0 @@ |
{ | ||
"name": "@bot-whatsapp/bot", | ||
"version": "0.0.221-alpha.0", | ||
"version": "0.0.222-alpha.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/bundle.bot.cjs", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98889
2465