2
0

🐛 Fix variable buttons with new engine

This commit is contained in:
Baptiste Arnaud
2023-02-21 18:00:09 +01:00
parent a4e3f4bf9c
commit 83ae57cf0c
5 changed files with 16 additions and 6 deletions

View File

@ -3,4 +3,9 @@ import { ChoiceInputBlock } from 'models'
export const validateButtonInput = (
buttonBlock: ChoiceInputBlock,
input: string
) => buttonBlock.items.some((item) => item.content === input)
) =>
buttonBlock.items.some(
(item) =>
item.content === input ||
(item.content?.startsWith('{{') && item.content.endsWith('}}'))
)