Skip to content

Commit

Permalink
fix(bot): 馃敟 endFlow with ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
Leifer Jes煤s Mendez committed Jan 29, 2023
1 parent b655ae4 commit f6114af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/bot/core/core.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,14 @@ class CoreClass {
if (next) return continueFlow()
return this.sendProviderAndSave(from, {
...prevMsg,
answer: message ?? prevMsg.answer,
answer:
typeof message === 'string'
? message
: message?.body ?? prevMsg.answer,
options: {
...prevMsg.options,
buttons: message?.buttons ?? prevMsg.options?.buttons,
},
})
}

Expand Down
2 changes: 1 addition & 1 deletion packages/bot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bot-whatsapp/bot",
"version": "0.0.84-alpha.0",
"version": "0.0.89-alpha.0",
"description": "",
"main": "./lib/bundle.bot.cjs",
"scripts": {
Expand Down

0 comments on commit f6114af

Please sign in to comment.