🐛 (results) Fix bug preventing user from seeing linked typebots results
This commit is contained in:
@@ -203,16 +203,7 @@ const getBodyContent =
|
||||
return body === '{{state}}'
|
||||
? JSON.stringify(
|
||||
resultValues
|
||||
? parseAnswers({
|
||||
groups: [
|
||||
...typebot.groups,
|
||||
...linkedTypebots.flatMap((t) => t.groups),
|
||||
],
|
||||
variables: [
|
||||
...typebot.variables,
|
||||
...linkedTypebots.flatMap((t) => t.variables),
|
||||
],
|
||||
})(resultValues)
|
||||
? parseAnswers(typebot, linkedTypebots)(resultValues)
|
||||
: await parseSampleResult(typebot, linkedTypebots)(groupId)
|
||||
)
|
||||
: body
|
||||
|
||||
@@ -180,13 +180,7 @@ const getEmailBody = async ({
|
||||
})) as unknown as PublicTypebot
|
||||
if (!typebot) return
|
||||
const linkedTypebots = await getLinkedTypebots(typebot)
|
||||
const answers = parseAnswers({
|
||||
groups: [...typebot.groups, ...linkedTypebots.flatMap((t) => t.groups)],
|
||||
variables: [
|
||||
...typebot.variables,
|
||||
...linkedTypebots.flatMap((t) => t.variables),
|
||||
],
|
||||
})(resultValues)
|
||||
const answers = parseAnswers(typebot, linkedTypebots)(resultValues)
|
||||
return {
|
||||
html: render(
|
||||
<DefaultBotNotificationEmail
|
||||
|
||||
Reference in New Issue
Block a user