fix(cli): working flowDynamic test

This commit is contained in:
Leifer Jesús Mendez
2023-02-03 19:26:00 +01:00
parent f76932021c
commit aef52d2694
2 changed files with 4 additions and 4 deletions

View File

@@ -172,10 +172,11 @@ class CoreClass {
for (const msg of parseListMsg) {
await this.sendProviderAndSave(from, msg)
}
const nextFlow = await this.flowClass.find(refToContinue?.ref, true)
const filterNextFlow = nextFlow.filter((msg) => msg.refSerialize !== currentPrev?.refSerialize)
console.log(`🚩🚩🚩`, filterNextFlow?.answer)
if (filterNextFlow.map((i) => i.keyword).includes(currentPrev?.ref)) return
return sendFlow(filterNextFlow, from, { prev: undefined })
}