Skip to content

Commit fe87f07

Browse files
committed
Handle resolved conversations in ChatwootService by re-calling createConversation
1 parent 2620064 commit fe87f07

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,11 @@ export class ChatwootService {
572572
this.logger.error(`Error getting conversation: ${error}`);
573573
conversationExists = false;
574574
}
575+
if (conversationExists && conversationExists.status === 'resolved') {
576+
this.logger.verbose('Conversation was resolved, re-calling createConversation');
577+
this.cache.delete(cacheKey);
578+
return await this.createConversation(instance, body);
579+
}
575580
if (!conversationExists) {
576581
this.logger.verbose('Conversation does not exist, re-calling createConversation');
577582
this.cache.delete(cacheKey);

0 commit comments

Comments
 (0)