reportMessage method Null safety
Report violation message
Param messageId
Violation Message ID
Param tag
The report type (For example: involving pornography and terrorism).
Param reason
The reason for reporting.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<void> reportMessage({
required String messageId,
required String tag,
required String reason,
}) async {
Map req = {"msgId": messageId, "tag": tag, "reason": reason};
Map result = await EMMethodChannel.ChatManager.invokeMethod(
ChatMethodKeys.reportMessage, req);
try {
EMError.hasErrorFromResult(result);
} on EMError catch (e) {
throw e;
}
}