[GOWS] - creates two separate ChatWoot conversations for the same contact
Describe the bug
Hello!
I'd like to point out an improvement that needs to be made. I don't know if there's already an issue for this.
But in tests I've performed on my Chatwoot with the Waha integration, when I make an active message through Chatwoot (it opens a conversation), when the person replies to my active message, when the message enters Chatwoot, it creates a new conversation. The correct way would be to enter the reply in the conversation that was already open because of the active message. Imagem
Steps
To Reproduce Steps to reproduce the problem:
Go to Chatwoot
Click on the left menu "Contacts" and select a "Contact"
Click "New Message", select the inbox "WAHA", type the message and send it
See the error
Expected Behavior
That when the client replies, the message should be inserted into the same conversation_id.
Actual Behavior
When the client replies, a new conversation is opened in Chatwoot, resulting in duplicate conversations with the same client.
Hi, I'm not a Chatwoot user but take note WA is using @lid in some chats when starts. If chat continues you could receive @c.us as new ID from the same user. In my case, I store the user ID for replies, but my index is the phone number (PN). If you receive @c.us it's straightforward, but with @lid you'll need to get the PN.
This happens sometimes here.
It doesn't "duplicate" the conversation, but it creates two separate conversations for the same contact.
From what I understand, there's a field called contact_inbox_id that needs to be unique, or something like that.
For now, I don't know exactly how to fix it, but it also creates two or more conversations.
I'm facing the same challenge.
When creating a conversation through Chatwoot, it creates a conversation_id.
When receiving a response from that asset, it creates another conversation_id. The API needs to check if a conversation_id already exists for the contact who received the asset and assign the response to the created conversation.
I've done this with other WhatsApp connection platforms.
It really is a real problem, I don't know how waha currently handles this, but they should check if there is already a conversation before opening a new one.
i have a same problem