Query Members

Query Channel Members

The ability to search for and query members within a chat channel is an essential feature for creating a seamless and engaging user experience. With Social Plus Chat SDK, developers can use the query member feature to allow users to search for and retrieve member information within a channel. We will discuss how to use the query member feature of Social Plus Chat SDK to enable users to search and retrieve member information within a chat channel.

Here's an explanation of the function parameter:

filter: A parameter accepting a filter enum, enabling filtering members with matching membership status.

  • ALL -> Members with any membership status

  • MEMBER -> Only active members

  • MUTED -> Only muted members

  • BANNED -> Only banned members

roles : A parameter accepting an array of roles, enabling filtering members with matching roles

includeDeleted : A parameter accepting a boolean value.

  • true -> include a member whose user has been deleted

  • false -> exclude member whose user has been deleted

Channel member count value is based on all members in the channel including the members whose user has been deleted.

sortBy : A parameter accepting a sorting option enum

  • FIRST_CREATED -> Sort by membership creation date ascending

  • LAST_CREATED -> Sort by membership creation date ascending

Note: The membership creation date is the time the user joins the channel.

All participation-related methods in a channel fall under a separate ChannelParticipation class.

Last updated