From e304b1dcdfc34ee812a6eeda0cb09f62322ad96d Mon Sep 17 00:00:00 2001 From: Rafael Souza Date: Thu, 17 Jul 2025 15:32:25 -0300 Subject: [PATCH] Fix erro key --- .../chatbot/chatwoot/services/chatwoot.service.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts b/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts index cdac0fcc..a72e1329 100644 --- a/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts +++ b/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts @@ -568,8 +568,7 @@ export class ChatwootService { public async createConversation(instance: InstanceDto, body: any) { if (!body?.key) { - this.logger.warn('body.key is null or undefined in createConversation'); - this.logger.warn('Full body object:', JSON.stringify(body, null, 2)); + this.logger.warn(`body.key is null or undefined in createConversation. Full body object: ${JSON.stringify(body)}`); return null; } @@ -1945,8 +1944,7 @@ export class ChatwootService { if (event === 'messages.upsert' || event === 'send.message') { if (!body?.key) { - this.logger.warn('body.key is null or undefined'); - this.logger.warn('Full body object:', JSON.stringify(body, null, 2)); + this.logger.warn(`body.key is null or undefined. Full body object: ${JSON.stringify(body)}`); return; } @@ -2273,8 +2271,7 @@ export class ChatwootService { if (event === 'messages.edit' || event === 'send.message.update') { if (!body?.key?.id) { - this.logger.warn('body.key.id is null or undefined in messages.edit'); - this.logger.warn('Full body object:', JSON.stringify(body, null, 2)); + this.logger.warn(`body.key.id is null or undefined in messages.edit. Full body object: ${JSON.stringify(body)}`); return; }