fix: Validate if chatwoot connection is available

This commit is contained in:
Judson Cairo 2024-09-25 13:07:20 -03:00
parent f54a00a07f
commit 49ceb44102

View File

@ -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');