Merge pull request #372 from edisoncm-ti/develop

Typebot: Remove quebra de linha no index final do array | Obtem a resposta de um sendList (Lista)
This commit is contained in:
Davidson Gomes 2024-01-21 18:13:26 -03:00 committed by GitHub
commit 1ceee572cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -274,6 +274,7 @@ export class TypebotService {
const types = { const types = {
conversation: msg.conversation, conversation: msg.conversation,
extendedTextMessage: msg.extendedTextMessage?.text, extendedTextMessage: msg.extendedTextMessage?.text,
responseRowId: msg.listResponseMessage.singleSelectReply?.selectedRowId,
}; };
this.logger.verbose('type message: ' + types); this.logger.verbose('type message: ' + types);
@ -412,7 +413,7 @@ export class TypebotService {
text += element.text; 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) { for (const child of element.children) {
text += applyFormatting(child); text += applyFormatting(child);
} }