From 49ceb441020dbb22c77146235d8678f19ec2af44 Mon Sep 17 00:00:00 2001 From: Judson Cairo Date: Wed, 25 Sep 2024 13:07:20 -0300 Subject: [PATCH] fix: Validate if chatwoot connection is available --- .../integrations/chatbot/chatwoot/services/chatwoot.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts b/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts index 8f5e8f2a..b52f6ced 100644 --- a/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts +++ b/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts @@ -890,7 +890,7 @@ export class ChatwootService { sourceId?: string, quotedMsg?: MessageModel, ) { - if (sourceId) { + if (sourceId && this.isImportHistoryAvailable()) { const messageAlreadySaved = await chatwootImport.getExistingSourceIds([sourceId]); if (messageAlreadySaved.size > 0) { this.logger.warn('Message already saved on chatwoot');