markMessageAsRead method

Future<void> markMessageAsRead(
  1. String messageId
)

将消息标为已读。

Param messageId 消息 ID。

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

Implementation

Future<void> markMessageAsRead(String messageId) async {
  Map req = this._toJson();
  req['msg_id'] = messageId;
  Map result = await _emConversationChannel.invokeMethod(
      ChatMethodKeys.markMessageAsRead, req);
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}