Contacts list not ordering properly JS

Hi team, we currently have the latest cometchat sdk installed on our website. My account has over 300 contacts, and i noticed for the first 10 contacts it rearranges them by last message received, but after that the order is all random. Are you able to let me know if this is an error on cometchats end, or if we can resolve this, as my developer has spent 10hours on this but cannot find on the code anywhere that the last message filter is limited to just 10.

thank you.

Hello @flipspot,

I am not sure what you mean by Contacts, but there are 2 different lists that the SDK provides:

  1. Conversation List: It is sorted by the last message.

  2. User List: It is sorted by status then name and then uid. So you will get all the online users first (sorted by name & uid) then the rest of the users would be sorted by name & uid.

If you wish to fetch the list based on the last message, then you are probably looking at the conversation list. You can read more about the Conversation List here.

Warm Regards,

CometChat Pro
Mayur Bhandari