mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 04:02:54 -06:00
Merge pull request #1 from JrStarkmidia/codex/localizar-uso-de-applyformatting-e-proteger-entrada
Corrige erro em applyFormatting com valores não estruturados Esta correção adiciona verificação de tipo e valor falsy antes de aplicar o processamento de texto. Correção baseada em: EvolutionAPI#1624
This commit is contained in:
commit
14474ede62
@ -197,6 +197,9 @@ export class TypebotService extends BaseChatbotService<TypebotModel, any> {
|
|||||||
* Apply rich text formatting for TypeBot messages
|
* Apply rich text formatting for TypeBot messages
|
||||||
*/
|
*/
|
||||||
private applyFormatting(element: any): string {
|
private applyFormatting(element: any): string {
|
||||||
|
if (typeof element === 'string') return element;
|
||||||
|
if (!element) return '';
|
||||||
|
|
||||||
let text = '';
|
let text = '';
|
||||||
|
|
||||||
if (element.text) {
|
if (element.text) {
|
||||||
|
Loading…
Reference in New Issue
Block a user