mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-19 03:59:17 +00:00
test: a lot test
This commit is contained in:
@@ -139,7 +139,7 @@ class CoreClass {
|
||||
|
||||
const continueFlow = async () => {
|
||||
const currentPrev = await this.databaseClass.getPrevByNumber(from)
|
||||
const nextFlow = await this.flowClass.find(refToContinue?.ref, true)
|
||||
const nextFlow = (await this.flowClass.find(refToContinue?.ref, true)) ?? []
|
||||
const filterNextFlow = nextFlow.filter((msg) => msg.refSerialize !== currentPrev?.refSerialize)
|
||||
const isContinueFlow = filterNextFlow.map((i) => i.keyword).includes(currentPrev?.ref)
|
||||
if (!isContinueFlow) await sendFlow(filterNextFlow, from, { prev: undefined })
|
||||
|
||||
Reference in New Issue
Block a user