diff --git a/src/whatsapp/services/typebot.service.ts b/src/whatsapp/services/typebot.service.ts index b5640240..36645f63 100644 --- a/src/whatsapp/services/typebot.service.ts +++ b/src/whatsapp/services/typebot.service.ts @@ -274,6 +274,7 @@ export class TypebotService { const types = { conversation: msg.conversation, extendedTextMessage: msg.extendedTextMessage?.text, + responseRowId: msg.listResponseMessage.singleSelectReply?.selectedRowId, }; this.logger.verbose('type message: ' + types); @@ -412,7 +413,7 @@ export class TypebotService { text += element.text; } - if (element.type === 'p' || element.type === 'inline-variable' || element.type === 'a') { + if (element.children && (element.type === 'p' || element.type === 'a' || element.type === 'inline-variable' || element.type === 'variable')) { for (const child of element.children) { text += applyFormatting(child); }