addOperators method

Future<void> addOperators(
  1. List<String> userIds
)

Add operators to the channel. See https://docs.sendbird.com/platform/user_type#3_operator for the explanations on the operators.

Implementation

Future<void> addOperators(List<String> userIds) async {
  sbLog.i(StackTrace.current, 'userIds: $userIds');
  checkUnsupportedAction();

  if (userIds.isEmpty) {
    throw InvalidParameterException();
  }

  await chat.apiClient.send(ChannelOperatorsAddRequest(
    chat,
    channelType: channelType,
    channelUrl: channelUrl,
    userIds: userIds,
  ));
}