mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 04:02:54 -06:00
fix: Correction of variables breaking lines in typebot
This commit is contained in:
parent
8eced6c575
commit
1f817df5f6
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
### Feature
|
### Feature
|
||||||
* New method of saving sessions to a file using worker, made in partnership with [codechat](https://github.com/code-chat-br/whatsapp-api)
|
* New method of saving sessions to a file using worker, made in partnership with [codechat](https://github.com/code-chat-br/whatsapp-api)
|
||||||
|
* Correction of variables breaking lines in typebot
|
||||||
|
|
||||||
# 1.8.0 (2024-05-27 16:10)
|
# 1.8.0 (2024-05-27 16:10)
|
||||||
|
|
||||||
|
@ -525,10 +525,14 @@ export class TypebotService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (element.type === 'p') {
|
if (element.type === 'p' && element.type !== 'inline-variable') {
|
||||||
text = text.trim() + '\n';
|
text = text.trim() + '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (element.type === 'inline-variable') {
|
||||||
|
text = text.trim();
|
||||||
|
}
|
||||||
|
|
||||||
if (element.type === 'ol') {
|
if (element.type === 'ol') {
|
||||||
text =
|
text =
|
||||||
'\n' +
|
'\n' +
|
||||||
@ -582,6 +586,8 @@ export class TypebotService {
|
|||||||
|
|
||||||
formattedText = formattedText.replace(/\*\*/g, '').replace(/__/, '').replace(/~~/, '').replace(/\n$/, '');
|
formattedText = formattedText.replace(/\*\*/g, '').replace(/__/, '').replace(/~~/, '').replace(/\n$/, '');
|
||||||
|
|
||||||
|
formattedText = formattedText.replace(/\n$/, '');
|
||||||
|
|
||||||
await instance.textMessage({
|
await instance.textMessage({
|
||||||
number: remoteJid.split('@')[0],
|
number: remoteJid.split('@')[0],
|
||||||
options: {
|
options: {
|
||||||
|
Loading…
Reference in New Issue
Block a user