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 operators

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) {
    //...
}