addRemoteAndLocalConversationsMark method

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

~english This method marks conversations both locally and on the server.

Param conversationIds The list of conversation IDs to mark.

Param mark The mark type. See ConversationMarkType.

Throws A description of the exception. See ChatError.

~end

~chinese 本地和服务端标记会话。

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

Param mark 标记类型,详见 ConversationMarkType

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

~end

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 {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}