2
0

fix(engine): 🐛 Webhook call on linked typebot

This commit is contained in:
Baptiste Arnaud
2022-03-31 10:33:35 +02:00
parent 7f5d2f4173
commit 86117d6d3c
3 changed files with 13 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ export const ChatBlock = ({
onBlockEnd,
}: ChatBlockProps) => {
const {
currentTypebotId,
typebot,
updateVariableValue,
createEdge,
@@ -50,6 +51,7 @@ export const ChatBlock = ({
onNewLog,
injectLinkedTypebot,
linkedTypebots,
setCurrentTypebotId,
} = useTypebot()
const { resultValues, updateVariables } = useAnswers()
const [processedSteps, setProcessedSteps] = useState<Step[]>([])
@@ -110,6 +112,7 @@ export const ChatBlock = ({
injectLinkedTypebot,
onNewLog,
createEdge,
setCurrentTypebotId,
})
nextEdgeId ? onBlockEnd(nextEdgeId, linkedTypebot) : displayNextStep()
}
@@ -118,7 +121,7 @@ export const ChatBlock = ({
step: currentStep,
context: {
apiHost,
typebotId: typebot.typebotId,
typebotId: currentTypebotId,
blockId: currentStep.blockId,
stepId: currentStep.id,
variables: typebot.variables,