New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bot-whatsapp/bot

Package Overview
Dependencies
Maintainers
1
Versions
286
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bot-whatsapp/bot - npm Package Compare versions

Comparing version 0.0.24-alpha.0 to 0.0.25-alpha.0

34

core/core.class.js

@@ -61,9 +61,9 @@ const { toCtx } = require('../io/methods')

/**
*
* @param {*} messageInComming
* GLOSSARY.md
* @param {*} messageCtxInComming
* @returns
*/
handleMsg = async (messageInComming) => {
logger.log(`[handleMsg]: `, messageInComming)
const { body, from } = messageInComming
handleMsg = async (messageCtxInComming) => {
logger.log(`[handleMsg]: `, messageCtxInComming)
const { body, from } = messageCtxInComming
let msgToSend = []

@@ -96,8 +96,22 @@ let fallBackFlag = false

// 📄 Se encarga de revisar si el contexto del mensaje tiene callback y ejecutarlo
const cbEveryCtx = (inRef) => {
const indexFlow = this.flowClass.findIndexByRef(inRef)
this.flowClass.allCallbacks[indexFlow].callback(
messageCtxInComming,
{
fallBack,
}
)
}
// 📄 [options: callback]: Si se tiene un callback se ejecuta
if (!fallBackFlag && refToContinue && prevMsg?.options?.callback) {
const indexFlow = this.flowClass.findIndexByRef(refToContinue?.ref)
this.flowClass.allCallbacks[indexFlow].callback(messageInComming, {
fallBack,
})
if (!fallBackFlag) {
if (refToContinue && prevMsg?.options?.callback) {
cbEveryCtx(refToContinue?.ref)
} else {
for (const ite of this.flowClass.find(body)) {
cbEveryCtx(ite?.ref)
}
}
}

@@ -104,0 +118,0 @@

@@ -34,6 +34,3 @@ const { generateRef } = require('../../utils/hash')

const callback =
typeof cb === 'function'
? cb
: () => console.log('Callback no definida')
const callback = typeof cb === 'function' ? cb : () => null

@@ -40,0 +37,0 @@ const lastCtx = inCtx.hasOwnProperty('ctx') ? inCtx.ctx : inCtx

{
"name": "@bot-whatsapp/bot",
"version": "0.0.24-alpha.0",
"version": "0.0.25-alpha.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "./lib/bundle.bot.cjs",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc