fix: enable sourceId exists in a conversation

This commit is contained in:
Alex Szefezuk
2025-05-21 10:36:26 -03:00
parent 7cccda10bb
commit 2545013040
2 changed files with 12 additions and 4 deletions

View File

@@ -930,7 +930,7 @@ export class ChatwootService {
quotedMsg?: MessageModel,
) {
if (sourceId && this.isImportHistoryAvailable()) {
const messageAlreadySaved = await chatwootImport.getExistingSourceIds([sourceId]);
const messageAlreadySaved = await chatwootImport.getExistingSourceIds([sourceId], conversationId);
if (messageAlreadySaved) {
if (messageAlreadySaved.size > 0) {
this.logger.warn('Message already saved on chatwoot');