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,
})

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

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。

Implementation

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