addRemoteAndLocalConversationsMark method

Future<void> addRemoteAndLocalConversationsMark(
  1. {required List<String> conversationIds,
  2. required ConversationMarkType mark}
)

标记会话。

调用该方法会同时为本地和服务器端的会话添加标记。

Param conversationIds 要标记的会话 ID 列表。

Param mark 要添加的会话标记,详见 ConversationMarkType

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

Implementation

Future<void> addRemoteAndLocalConversationsMark({
  required List<String> conversationIds,
  required ConversationMarkType mark,
}) async {
  Map map = {
    'convIds': conversationIds,
    'mark': mark.index,
  };

  Map result = await ChatChannel.invokeMethod(
    ChatMethodKeys.addRemoteAndLocalConversationsMark,
    map,
  );
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}