test: a lot test

This commit is contained in:
Leifer Mendez
2023-02-09 15:09:52 +01:00
parent af803415e3
commit dda59fa93b
16 changed files with 530 additions and 513 deletions

View File

@@ -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 })