2
0

🚸 (videoBubble) Reparse variable video URL to correctly detect provider

This commit is contained in:
Baptiste Arnaud
2023-10-03 11:44:51 +02:00
parent a53d128fb0
commit a7b784b446
4 changed files with 55 additions and 35 deletions

View File

@ -25,6 +25,7 @@ import { injectVariableValuesInPictureChoiceBlock } from './blocks/inputs/pictur
import { getPrefilledInputValue } from './getPrefilledValue'
import { parseDateInput } from './blocks/inputs/date/parseDateInput'
import { deepParseVariables } from './variables/deepParseVariables'
import { parseVideoUrl } from '@typebot.io/lib/parseVideoUrl'
export const executeGroup =
(
@ -176,6 +177,13 @@ const parseBubbleBlock =
},
}
}
case BubbleBlockType.VIDEO: {
const parsedContent = deepParseVariables(variables)(block.content)
return {
...block,
content: parsedContent.url ? parseVideoUrl(parsedContent.url) : {},
}
}
default:
return deepParseVariables(variables)(block)
}