Merge pull request #555 from jaison-x/pr

fix(chatwoot): fix bug when chatwoot params reopen_conversation and conversation_pending are enabled
This commit is contained in:
Davidson Gomes
2024-04-23 19:10:57 -03:00
committed by GitHub

View File

@@ -628,7 +628,7 @@ export class ChatwootService {
id: contactId,
})) as any;
if (contactConversations) {
if (contactConversations?.payload?.length) {
let conversation: any;
if (this.provider.reopen_conversation) {
conversation = contactConversations.payload.find((conversation) => conversation.inbox_id == filterInbox.id);