isMemberInGroupMuteList method

Future<bool> isMemberInGroupMuteList(
  1. String groupId
)

~english Checks whether the current user is in the group mute list.

Param groupId The group ID.

Returns True if current user is muted, false otherwise.

Throws Exception description, see EMError. ~end

~chinese 查看自己是否在群组禁言名单中。

Param groupId 群组 ID。

Return 若当前用户在禁言列表中返回 true,否则返回 false。

Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError。 ~end

Implementation

Future<bool> isMemberInGroupMuteList(String groupId) async {
  try {
    Map req = {'groupId': groupId};
    Map result = await Client.instance.groupManager
        .callNativeMethod(ChatMethodKeys.isMemberInGroupMuteList, req);
    EMError.hasErrorFromResult(result);
    return result.boolValue(ChatMethodKeys.isMemberInGroupMuteList);
  } catch (e) {
    rethrow;
  }
}