🧑💻 (whatsapp) Option to modify the default interactive split message number (#1296)
When using the whatsapp oficial api or another that use the same schema, with env we can modify the number of groups that the interactive group will be split. --------- Co-authored-by: Baptiste Arnaud <baptiste.arnaud95@gmail.com> Co-authored-by: Baptiste Arnaud <contact@baptiste-arnaud.fr>
This commit is contained in:
@ -6,6 +6,7 @@ import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/const
|
||||
import { defaultPictureChoiceOptions } from '@typebot.io/schemas/features/blocks/inputs/pictureChoice/constants'
|
||||
import { defaultChoiceInputOptions } from '@typebot.io/schemas/features/blocks/inputs/choice/constants'
|
||||
import { convertRichTextToMarkdown } from '@typebot.io/lib/markdown/convertRichTextToMarkdown'
|
||||
import { env } from '@typebot.io/env'
|
||||
|
||||
export const convertInputToWhatsAppMessages = (
|
||||
input: NonNullable<ContinueChatResponse['input']>,
|
||||
@ -110,7 +111,7 @@ export const convertInputToWhatsAppMessages = (
|
||||
]
|
||||
const items = groupArrayByArraySize(
|
||||
input.items.filter((item) => isDefined(item.content)),
|
||||
3
|
||||
env.WHATSAPP_INTERACTIVE_GROUP_SIZE
|
||||
) as ButtonItem[][]
|
||||
return items.map((items, idx) => ({
|
||||
type: 'interactive',
|
||||
|
Reference in New Issue
Block a user