interface FetchHistoryMessagesParam {
    conversationId: string;
    conversationType: ConversationType;
    cursor?: string;
    pageSize?: number;
    searchOptions?: SearchOptions;
}

Properties

conversationId: string

会话 ID。

  • 单聊:对端用户的用户 ID;
  • 群聊:群组 ID。
  • 聊天室:聊天室 ID。
conversationType: ConversationType

会话类型。

cursor?: string

查询的起始游标位置。可选参数,默认值为空字符串,即从起始位开始。

pageSize?: number

每页获取的消息条数。可选参数,默认为20,取值范围为 [1,50]。

searchOptions?: SearchOptions

查询历史消息的参数配置接口。