Hey everyone! ![]()
Something super weird is happening with our custom chat widget!
We’ve got about 800 agents in our org, so we’re dealing with a ton of traffic.
The WebSocket connection is staying open, but the message states are acting up!
Basically, when a user sends a message, the “sent” confirmation is received via the socket.
But!
Then the UI just freezes for a second.
The message doesn’t mark as “delivered” even though the agent sees it immediately.
It’s almost like the event isn’t firing or is being dropped!
We’re using the latest web_messaging_sdk.
I tried to pull the history manually to see if the state is correct on the backend.
The call to GET /api/v2/webmessaging/messages shows everything as delivered.
// Checking the response from the API
{
"entities": [
{
"id": "msg-12345",
"text": "Hello!",
"state": "delivered",
"timestamp": "2023-10-27T10:00:00Z"
}
]
}
The SDK is just not reflecting this in the real-time stream!
The socket logs are clean.
No 400s or 500s are being thrown.
A few different browsers were tested and the same thing happens.
The session is authenticated and everything is configured perfectly!
Wait, I noticed it only happens when the conversation is transferred from a bot to an agent.
The state sync seems to break right at the handover point!