Skip to content

Commit 1665654

Browse files
committed
feat: typebot send list
1 parent 133eddd commit 1665654

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/api/integrations/chatbot/typebot/services/typebot.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@ export class TypebotService {
245245

246246
const menuContent = formattedText.match(/\[menu\]([\s\S]*?)\[\/menu\]/)?.[1];
247247
if (menuContent) {
248-
const sections = menuContent.match(/\[section\]([\s\S]*?)(?=\[section\]|\[\/section\])/g);
248+
const sections = menuContent.match(/\[section\]([\s\S]*?)(?=\[section\]|\[\/section\]|\[\/menu\])/g);
249249
if (sections) {
250250
sections.forEach((section) => {
251251
const sectionTitle = section.match(/title: (.*?)(?:\n|$)/)?.[1]?.trim();
252-
const rows = section.match(/\[row\]([\s\S]*?)(?=\[row\]|\[\/section\]|\[\/menu\])/g);
252+
const rows = section.match(/\[row\]([\s\S]*?)(?=\[row\]|\[\/row\]|\[\/section\]|\[\/menu\])/g);
253253

254254
const sectionData = {
255255
title: sectionTitle,
@@ -437,11 +437,11 @@ export class TypebotService {
437437

438438
const menuContent = formattedText.match(/\[menu\]([\s\S]*?)\[\/menu\]/)?.[1];
439439
if (menuContent) {
440-
const sections = menuContent.match(/\[section\]([\s\S]*?)(?=\[section\]|\[\/section\])/g);
440+
const sections = menuContent.match(/\[section\]([\s\S]*?)(?=\[section\]|\[\/section\]|\[\/menu\])/g);
441441
if (sections) {
442442
sections.forEach((section) => {
443443
const sectionTitle = section.match(/title: (.*?)(?:\n|$)/)?.[1]?.trim();
444-
const rows = section.match(/\[row\]([\s\S]*?)(?=\[row\]|\[\/section\]|\[\/menu\])/g);
444+
const rows = section.match(/\[row\]([\s\S]*?)(?=\[row\]|\[\/row\]|\[\/section\]|\[\/menu\])/g);
445445

446446
const sectionData = {
447447
title: sectionTitle,

0 commit comments

Comments
 (0)