fix(bot): 🔥 endFlow with ctx

This commit is contained in:
Leifer Jesús Mendez
2023-01-29 13:39:09 +01:00
parent b655ae449e
commit f6114affad
2 changed files with 9 additions and 2 deletions

View File

@@ -166,7 +166,14 @@ class CoreClass {
if (next) return continueFlow() if (next) return continueFlow()
return this.sendProviderAndSave(from, { return this.sendProviderAndSave(from, {
...prevMsg, ...prevMsg,
answer: message ?? prevMsg.answer, answer:
typeof message === 'string'
? message
: message?.body ?? prevMsg.answer,
options: {
...prevMsg.options,
buttons: message?.buttons ?? prevMsg.options?.buttons,
},
}) })
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@bot-whatsapp/bot", "name": "@bot-whatsapp/bot",
"version": "0.0.84-alpha.0", "version": "0.0.89-alpha.0",
"description": "", "description": "",
"main": "./lib/bundle.bot.cjs", "main": "./lib/bundle.bot.cjs",
"scripts": { "scripts": {