Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Version 4
Home
/
Chat
/
JavaScript
/
User

Retrieve a list of operators

Copy link

You can follow the simple implementation below to retrieve a list of operators who monitor and control the activities in a channel.

const query = channel.createOperatorListQuery();

const operators = await query.next();

In an open channel, you can also retrieve a list of operators and check each of them like the following.

const query = channel.createOperatorListQuery();

const operators = await query.next();

for (const operator in channel.operators) {
    // ...
}