For a specific order, set one of the values in the following table to the order property of MemberListQueryParams.
Value
Description
MEMBER_NICKNAME_ALPHABETICAL
Members are arranged in an alphabetical order. This is the default value.
OPERATOR_THEN_MEMBER_ALPHABETICAL
Operators are listed first, then the members, both in an alphabetical order.
val query = groupChannel.createMemberListQuery(
MemberListQueryParams().apply {
limit = 10
order = MemberListQuery.Order.OPERATOR_THEN_MEMBER_ALPHABETICAL
}
)
query.next { members, e ->
if (e != null) {
// Handle error.
}
// A list of matching members and operators is successfully retrieved.
// Through the members parameter of the callback method,
// you can access the data of each item from the result list that the Sendbird server has passed to the callback method.
}
No filter is applied to the group channel list. This is the default value.
operator
Only operators are retrieved in the list.
nonOperator
All members, except for operators, are retrieved in the list.
val query = groupChannel.createMemberListQuery(
MemberListQueryParams().apply {
limit = 10
operatorFilter = OperatorFilter.OPERATOR // ALL, OPERATOR, and NONOPERATOR
}
)
query.next { members, e ->
if (e != null) {
// Handle error.
}
// A list of matching members and operators is successfully retrieved.
// Through the members parameter of the callback method,
// you can access the data of each item from the result list that the Sendbird server has passed to the callback method.
}