removeMemberFromChatThread method

Future<void> removeMemberFromChatThread({
  1. required String memberId,
  2. required String chatThreadId,
})

~english Remove member from Chat Thread.

Param memberId The ID of the member that was removed from Chat Thread.

Param chatThreadId Chat Thread ID.

Throws A description of the exception. See ChatError. ~end

~chinese 移除子区成员。

@note 只有子区所属群主、群管理员及子区创建者可调用该方法。

被移出的成员会收到 ChatThreadEventHandler.onUserKickOutOfChatThread 回调。

Param memberId 被移出子区的成员的用户 ID。

Param chatThreadId 子区 ID。

Throws A description of the exception. See ChatError. ~end

Implementation

Future<void> removeMemberFromChatThread({
  required String memberId,
  required String chatThreadId,
}) async {
  Map req = {
    "memberId": memberId,
    "threadId": chatThreadId,
  };
  Map result = await _channel.invokeMethod(
    ChatMethodKeys.removeMemberFromChatThread,
    req,
  );
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}