Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Home
/
Chat
/
JavaScript
/
User
This is the new Docs for Chat SDK v4 for JavaScript. To see the previous Docs, click here.

Retrieve a list of members and operators in a specific order

The members and operators of a group channel can be retrieved by calling the createMemberListQuery() method of a memberListQuery instance. For a specific order, set one of the options in the following table to the order property of memberListQuery.

MemberListQuery.Order

ValueDescription

MEMBER_NICKNAME_ALPHABETICAL

Members are arranged in an alphabetical order. This is the default value.

OPERATOR_THEN_MEMBER_ALPHABETICAL

Operators are listed before the members, both in an alphabetical order.

const queryParams: MemberListQueryParams = {
    limit: 10,
    order: MemberListOrder.OPERATOR_THEN_MEMBER_ALPHABETICAL,
};
const query = channel.createMemberListQuery(queryParams);

const members = await query.next();