joinChannel method

Future<NIMResult<ChannelFullInfo>> joinChannel(
  1. {required String channelId,
  2. int? selfUid,
  3. String? customInfo,
  4. required bool offlineEnabled}
)

加入频道 错误码如下: 10407:已经频道内 10417:uid冲突 10419:频道人数超限,默认100,可通过APPID配置 10420:自己的其他端已经在频道内

channelId 对应频道id selfUid 自己在频道中对应的uid,可选,大于零有效,无效时服务器会分配随机唯一的uid, 也可以自己生成,但要保证唯一性 customInfo 操作者附加的自定义信息,透传给其他人,可缺省 offlineEnable 通知事件是否存离线

Implementation

Future<NIMResult<ChannelFullInfo>> joinChannel(
    {required String channelId,
    int? selfUid,
    String? customInfo,
    required bool offlineEnabled}) {
  return _platform.joinChannel(
      channelId: channelId,
      selfUid: selfUid,
      customInfo: customInfo,
      offlineEnabled: offlineEnabled);
}