mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-17 19:26:23 +00:00
fix(bot): ⚡ endFlow butons
This commit is contained in:
@@ -122,13 +122,7 @@ class CoreClass {
|
||||
endFlowFlag = true
|
||||
if (message)
|
||||
this.sendProviderAndSave(from, createCtxMessage(message))
|
||||
|
||||
clearQueue()
|
||||
if (message)
|
||||
this.sendProviderAndSave(from, {
|
||||
...prevMsg,
|
||||
answer: message ?? prevMsg.answer,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -171,7 +165,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,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@bot-whatsapp/bot",
|
||||
"version": "0.0.86-alpha.0",
|
||||
"version": "0.0.91-alpha.0",
|
||||
"description": "",
|
||||
"main": "./lib/bundle.bot.cjs",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user