fix(chatwoot): fix bug when chatwoot params reopen_conversation and conversation_pending are enabled

This commit is contained in:
jaison-x 2024-04-22 13:37:52 -03:00
parent 92f8951be4
commit 0ee243f284

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