Merge pull request #1070 from help-corretora/main

Quando a conversa está aberta e o cliente manda mensagem, o status da conversa muda para pendente.
This commit is contained in:
Davidson Gomes 2024-11-15 10:59:10 -03:00 committed by GitHub
commit 09a33a423e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -704,7 +704,7 @@ export class ChatwootService {
conversation = contactConversations.payload.find((conversation) => conversation.inbox_id == filterInbox.id);
this.logger.verbose(`Found conversation in reopenConversation mode: ${JSON.stringify(conversation)}`);
if (this.provider.conversationPending) {
if (this.provider.conversationPending && conversation.status !== 'open') {
if (conversation) {
await client.conversations.toggleStatus({
accountId: this.provider.accountId,