/ SDKs / Unreal
SDKs
Chat SDKs Unreal v3
Chat SDKs Unreal
Chat SDKs
Unreal
Version 3

Managing operators in an open channel

Copy link

You can manage operators in an open channel by registering a participant as an operator or removing a participant's role as an operator. When a user's role as an operator is removed, the user can still stay in the channel as a participant.


Register a participant as an operator

Copy link

You can register a participant as an operator of an open channel by using the following code:

openChannel->AddOperators(USER_IDS, [](SBDError* error) {
    if (error != nullptr) {
        // Handle error.
        return;
    }

    // Participant is successfully registered as an operator of the channel.
});

Remove the operator role from a participant

Copy link

You can remove the operator role from a participant by following the code below:

openChannel->RemoveOperators(USER_IDS, [](SBDError* error) {
    if (error != nullptr) {
        // Handle error.
        return;
    }

    // The participant's role as an operator is successfully removed
    // and you can display a message to those who are no longer operators.
});

Note: The user can still stay in the channel as a participant.

If you want to remove the role from all operators in a channel at once, use the following code:

openChannel->RemoveAllOperators([](SBDError* error) {
    if (error != nullptr) {
        // Handle error.
        return;
    }

    // All operator roles are successfully removed
    // and you can display a message to those who are no longer operators.
});