SearchCloudMessagesParams

SearchCloudMessagesParams

Properties:
Name Type Attributes Description
keyword string <optional>

关键字列表。

senderUserIDList Array.<string> <optional>

指定 userID 发送的消息,最多支持 5 个。

messageTypeList Array.<string> <optional>

指定搜索的消息类型集合,默认搜索全部类型。

  • 不传入时,表示搜索支持的全部类型消息(TencentCloudChat.TYPES.MSG_FACE、TencentCloudChat.TYPES.MSG_GRP_TIP 和 TencentCloudChat.TYPES.MSG_GRP_SYS_NOTICE 不支持)
  • 传值时,取值详见 TencentCloudChat.TYPES
conversationID string <optional>

搜索“全部会话”还是搜索“指定的会话”,不传入时,表示全部会话,默认:全部会话。会话 ID 组成方式:

  • C2C${userID}(单聊)
  • GROUP${groupID}(群聊)
  • 社群、topic、直播群,不支持搜索云端消息
timePosition number <optional>

搜索的起始时间点。默认为 0 即代表从现在开始搜索。单位:秒

timePeriod number <optional>

从起始时间点开始的过去时间范围,单位秒。默认为 0 即代表不限制时间范围,传 24 * 60 * 60 代表过去一天。

cursor string <optional>

每次云端搜索的起始位置。第一次搜索时不要传入 cursor,继续搜索时填入上次调用 searchCloudMessages 接口返回的 cursor 的值

  • 注意:全量搜索时,cursor 的有效期为 2 分钟。

搜索云端消息参数