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 Amity 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 Amity 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 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: 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