2
0

🐛 (typebotLink) Fix nested typebot link pop

This commit is contained in:
Baptiste Arnaud
2023-09-29 11:23:04 +02:00
parent f9a14c0685
commit cd97da2d34
4 changed files with 13 additions and 9 deletions

View File

@ -88,12 +88,13 @@ export const startWhatsAppSession = async ({
},
})
const sessionState: SessionState = chatReply.newSessionState
let sessionState: SessionState = chatReply.newSessionState
// If first block is an input block, we can directly continue the bot flow
const firstEdgeId =
sessionState.typebotsQueue[0].typebot.groups[0].blocks[0].outgoingEdgeId
const nextGroup = await getNextGroup(sessionState)(firstEdgeId)
sessionState = nextGroup.newSessionState
const firstBlock = nextGroup.group?.blocks.at(0)
if (firstBlock && isInputBlock(firstBlock)) {
const resultId = sessionState.typebotsQueue[0].resultId