From 1be58c8487ec669d0a1eec3168edad04469674ba Mon Sep 17 00:00:00 2001 From: Anderson Silva Date: Thu, 4 Sep 2025 12:19:51 -0300 Subject: [PATCH] refactor: improve linkPreview implementation based on PR feedback - Default linkPreview to true when not specified for backward compatibility - Validate linkPreview is boolean before passing to textMessage - Consolidate debug logs and remove sensitive data from logging - Sanitize API keys in debug output ([REDACTED]) - Reduce log verbosity while maintaining debugging capability - Ensure robust fallback behavior for malformed responses Addresses PR feedback regarding: - Backward compatibility preservation - Security considerations in logging - Input validation and error handling --- .../services/evolutionBot.service.ts | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/api/integrations/chatbot/evolutionBot/services/evolutionBot.service.ts b/src/api/integrations/chatbot/evolutionBot/services/evolutionBot.service.ts index f6bcf8f1..2a2cbeea 100644 --- a/src/api/integrations/chatbot/evolutionBot/services/evolutionBot.service.ts +++ b/src/api/integrations/chatbot/evolutionBot/services/evolutionBot.service.ts @@ -106,49 +106,57 @@ export class EvolutionBotService extends BaseChatbotService