We are on online marketplace where users can book services with each other. We use Sendbird as our communication channel between users (each booking is a chat and so therefore there are several chats between the same 2 users).
It would be very useful for us (and I guess other marketplaces where there is repeat and which work in a similar way) if we could retrieve a list of all other users that a logged in user has contacted in the past so that we can create a list of “contacts”.
I understand that there is a User List Query function but this seems to be only for “users blocked by the currently logged in user”.
Right now, we have to:
- Fetch all group channels
- Parse out the unique user ids in these
- Where a user ID is not equal to the ID of the logged-in user then that user becomes a contact.
- We then sort this list alphabetically.
- As the logged in user scrolls his contacts we add more to the list.
However, given this is a workaround it results in a rather odd UX, as not all new users are added to the bottom of the contact list - sometimes they can be added in the middle or even at the top of the list when the names of the newly parsed users say begin with “A”.
It would be great if we could have a function whereby we can retrieve these contacts directly, sorted name alphabetically.
If there’s a way this can already be done which I may have missed please let me know.