@bot-whatsapp/bot
Advanced tools
Comparing version 0.0.223-alpha.0 to 0.0.224-alpha.0
@@ -176,10 +176,10 @@ const { EventEmitter } = require('node:events') | ||
const endFlow = | ||
(flag) => | ||
async (message = null) => { | ||
flag.endFlow = true | ||
endFlowFlag = true | ||
if (message) this.sendProviderAndSave(from, createCtxMessage(message)) | ||
clearQueue() | ||
return | ||
} | ||
(flag) => | ||
async (message = null) => { | ||
flag.endFlow = true | ||
endFlowFlag = true | ||
if (message) this.sendProviderAndSave(from, createCtxMessage(message)) | ||
clearQueue() | ||
return | ||
} | ||
@@ -192,3 +192,3 @@ // 📄 Finalizar flujo (patch) | ||
endFlowFlag = true | ||
if (Array.isArray(messages)) { | ||
@@ -269,4 +269,6 @@ for (const iteratorCtxMessage of messages) { | ||
} | ||
const filterNextFlow = nextFlow.filter((msg) => msg.refSerialize !== currentPrev?.refSerialize) | ||
const isContinueFlow = filterNextFlow.map((i) => i.keyword).includes(currentPrev?.ref) | ||
console.log('--------------->', isContinueFlow, initRef) | ||
@@ -283,2 +285,6 @@ if (!isContinueFlow) { | ||
} | ||
if (initRef) { | ||
return exportFunctionsSend(() => sendFlow(filterNextFlow, from, { prev: undefined })) | ||
} | ||
} | ||
@@ -461,3 +467,2 @@ // 📄 [options: fallBack]: esta funcion se encarga de repetir el ultimo mensaje | ||
cb: async (opts) => { | ||
endFlowFlag = false | ||
await runContext(true, { idleFallBack: opts.next, ref: opts.inRef, body: opts.body }) | ||
@@ -464,0 +469,0 @@ }, |
@@ -0,0 +0,0 @@ const { generateRef } = require('../../utils/hash') |
@@ -0,0 +0,0 @@ const { generateRef } = require('../../utils/hash') |
@@ -0,0 +0,0 @@ const { generateRef } = require('../../utils/hash') |
@@ -0,0 +0,0 @@ const { generateRef } = require('../../utils/hash') |
@@ -0,0 +0,0 @@ const { generateRef } = require('../../utils/hash') |
@@ -0,0 +0,0 @@ const { generateRef } = require('../../utils/hash') |
@@ -0,0 +0,0 @@ const { generateRef } = require('../../utils/hash') |
@@ -0,0 +0,0 @@ const { generateRef } = require('../../utils/hash') |
@@ -0,0 +0,0 @@ const { eventDocument, REGEX_EVENT_DOCUMENT } = require('./eventDocument') |
const addAction = () => async () => {} | ||
module.exports = { addAction } |
@@ -0,0 +0,0 @@ MIT License |
{ | ||
"name": "@bot-whatsapp/bot", | ||
"version": "0.0.223-alpha.0", | ||
"version": "0.0.224-alpha.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/bundle.bot.cjs", |
@@ -0,0 +0,0 @@ const { EventEmitter } = require('node:events') |
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
154415
25
3981
10
3