ChatMessageSearchOption constructor

ChatMessageSearchOption({
  1. required List<String> keywordList,
  2. ChatKeywordListMatchType keywordMatchType = ChatKeywordListMatchType.OR,
  3. String? conversationId,
  4. List<MessageType>? msgTypes,
  5. int? startTime,
  6. int? endTime,
  7. MessageSearchScope searchScope = MessageSearchScope.Content,
})

~english Creates a message search option.

Param keywordList The keyword list, which can contain up to 5 keywords. Each keyword contains 1-120 characters, and all keywords together contain up to 120 characters.

Param keywordMatchType The match type for the keyword list. The default value is ChatKeywordListMatchType.OR.

Param conversationId The conversation ID. If it is not set, messages in all conversations are searched.

Param msgTypes The message type list. The CMD and VOICE types are not supported.

Param startTime The start timestamp for the search, in milliseconds. It must be set in pair with endTime.

Param endTime The end timestamp for the search, in milliseconds. It must be set in pair with startTime.

Param searchScope The message search scope. The default value is MessageSearchScope.Content. ~end

~chinese 创建服务端消息搜索选项。

Param keywordList 关键词列表,最多 5 个关键词。每个关键词 1-120 个字符,所有关键词总共最大 120 个字符。

Param keywordMatchType 多关键词的匹配方式,默认为 ChatKeywordListMatchType.OR。

Param conversationId 会话 ID,不设置时搜索所有会话。

Param msgTypes 消息类型列表,不支持 CMD 和 VOICE 类型。

Param startTime 搜索的起始时间戳,单位为毫秒,须与 endTime 成对设置。

Param endTime 搜索的结束时间戳,单位为毫秒,须与 startTime 成对设置。

Param searchScope 消息搜索范围,默认为 MessageSearchScope.Content。 ~end

Implementation

ChatMessageSearchOption({
  required this.keywordList,
  this.keywordMatchType = ChatKeywordListMatchType.OR,
  this.conversationId,
  this.msgTypes,
  this.startTime,
  this.endTime,
  this.searchScope = MessageSearchScope.Content,
});