reportMessage method

Future<void> reportMessage({
  1. required String messageId,
  2. required String tag,
  3. required String reason,
})

~english Reports an inappropriate message.

Param messageId The ID of the message to report.

Param tag The tag of the inappropriate message. You need to type a custom tag, like porn or ad.

Param reason The reporting reason. You need to type a specific reason.

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

~chinese 举报消息。

Param messageId 要举报的消息 ID。

Param tag 非法消息的标签。你需要填写自定义标签,例如涉政广告

Param reason 举报原因。你需要自行填写举报原因。

Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 EMError。 ~end

Implementation

Future<void> reportMessage({
  required String messageId,
  required String tag,
  required String reason,
}) async {
  return Client.instance.chatManager
      .reportMessage(messageId: messageId, tag: tag, reason: reason);
}