sendControl method

Future<NIMResult<void>> sendControl({
  1. required String channelId,
  2. required String accountId,
  3. String? customInfo,
})

该接口用于在频道中透传一些自定义指令,协助频道管理。该接口允许非频道内成员调用,但接收者必须是频道内成员或创建者

错误码如下: 10201:已经成功发出命令但是对方不在线(推送可达,但是离线) 10404:频道不存在 10406:不在频道内(自己或者对方) channelId 频道id accountId 对方accid,如果为空,则通知所有人 customInfo 操作者附加的自定义信息,透传给其他人,可缺省

Implementation

Future<NIMResult<void>> sendControl(
    {required String channelId,
    required String accountId,
    String? customInfo}) {
  return _platform.sendControl(
      channelId: channelId, accountId: accountId, customInfo: customInfo);
}