muteAllChatRoomMembers method
- String roomId
~english Mutes all members.
Only the chat room owner or admin can call this method.
This method does not work for the chat room owner, admin, and members added to the allow list.
Param roomId
The chat room ID.
Throws A description of the exception. See ChatError. ~end
~chinese 设置全员禁言。
仅聊天室所有者和管理员可调用此方法。
聊天室所有者、管理员及加入白名单的用户不受影响。
Param roomId
聊天室 ID。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。 ~end
Implementation
Future<void> muteAllChatRoomMembers(String roomId) async {
Map req = {"roomId": roomId};
Map result = await _channel.invokeMethod(
ChatMethodKeys.muteAllChatRoomMembers,
req,
);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}