@bot-whatsapp/bot
Advanced tools
Comparing version 0.0.180-alpha.0 to 0.0.181-alpha.0
@@ -346,6 +346,6 @@ const { EventEmitter } = require('node:events') | ||
idleForCallback.stop(inRef) | ||
const runContext = async (continueAfterIdle = true, overCtx = {}) => { | ||
messageCtxInComming = { ...messageCtxInComming, ...overCtx } | ||
await this.flowClass.allCallbacks[inRef](messageCtxInComming, argsCb) | ||
idleForCallback.stop(inRef) | ||
//Si no hay llamado de fallaback y no hay llamado de flowDynamic y no hay llamado de enflow EL flujo continua | ||
@@ -357,6 +357,5 @@ const ifContinue = !flags.endFlow && !flags.fallBack && !flags.flowDynamic | ||
if (startIdleMs > 0) { | ||
idleForCallback.setIdleTime(inRef, startIdleMs / 1000) | ||
idleForCallback.setIdleTime(inRef, (startIdleMs / 1000)) | ||
idleForCallback.start(inRef) | ||
idleForCallback.on(`timeout_${inRef}`, async () => { | ||
console.log('escuchando...',`timeout_${inRef}`) | ||
idleForCallback.once(`timeout_${inRef}`, async () => { | ||
await runContext(false, { idleFallBack: !!startIdleMs, from: null, body: null }) | ||
@@ -363,0 +362,0 @@ }) |
{ | ||
"name": "@bot-whatsapp/bot", | ||
"version": "0.0.180-alpha.0", | ||
"version": "0.0.181-alpha.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/bundle.bot.cjs", |
Sorry, the diff of this file is not supported yet
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
130850
3363