mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-19 20:19:15 +00:00
next save conversation
This commit is contained in:
@@ -46,9 +46,8 @@ class CoreClass {
|
||||
* @private
|
||||
* @param {*} ctxMessage
|
||||
*/
|
||||
handleMsg = ({ body, to, from }) => {
|
||||
handleMsg = ({ body, from }) => {
|
||||
let msgToSend = []
|
||||
console.log('____', this.databaseClass.listHistory)
|
||||
const prevMsg = [...this.databaseClass.listHistory].pop()
|
||||
|
||||
if (prevMsg?.ref && prevMsg?.options?.capture) {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@bot-whatsapp/cli": "*",
|
||||
"@bot-whatsapp/provider": "*",
|
||||
"kleur": "^4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
const { test } = require('uvu')
|
||||
const assert = require('uvu/assert')
|
||||
const MockProvider = require('../../../__mocks__/mock.provider')
|
||||
const { createBot, CoreClass } = require('@bot-whatsapp/bot')
|
||||
const { createBot, CoreClass } = require('../index')
|
||||
|
||||
class MockFlow {
|
||||
find = () => {}
|
||||
}
|
||||
|
||||
class MockDB {
|
||||
listHistory = []
|
||||
save = () => {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user