The problem only occurs with the Converse API; the Webchat functions correctly.
Upon inspecting the database, it is apparent that the 'createdOn' timestamp for sequentially sent messages is identical, leading to the mixed-up order. For example:
- User input prompt
- Message intended to display after user input
- Subsequent rendering of user input
What's puzzling is that while examining the database, the createdOn
value in the event
column differs from the one in the createdOn
column used for event sorting:
Event Column
//Dropdown Component asking for user input
{""type"":""custom"",""channel"":""api"",""direction"":""outgoing"",""createdOn"":""2021-04-13T12:45:54.924Z""}
//Response meant to follow user input
{""type"":""text"",""channel"":""api"",""direction"":""outgoing"",""createdOn"":""2021-04-13T12:46:02.645Zāā}
//User Input
{""type"":""text"",""channel"":""api"",""direction"":""incoming"",""createdOn"":""2021-04-13T12:46:02.420Z""}
CreatedOn Column
//Dropdown Component
2021-04-13 12:45:55.243118+00
//Message following User Input
2021-04-13 12:46:03.253342+00
//User Input
2021-04-13 12:46:03.253342+00
Is there a solution to this issue to ensure correct ordering?