同步旧式会话
接口边界
- 调用方:仅限受信业务后端
- 作用域:最近消息包含最新修改;即使 last_msg_seqs 已追平,修改过的末条消息也会重复返回,按消息 ID 和版本合并。
- 成功判定:不改变旧数组结构、会话版本、未读、排序、only_unread 或 msg_count=0 规则。
- 恢复:临时读取失败返回 503 unavailable;保留原请求和缓存,退避重试。恢复代数增加后重置消息版本比较。
已弃用
POST
/conversation/sync从当前 Leader 已落盘数据读取摘要和最近消息,不激活频道。发送失败的消息也可显示;读取失败则整次失败。保留旧式字段和游标规则。
请求主体
application/json
旧式会话同步的游标、过滤与分页参数。
TypeScript 定义
在 TypeScript 中使用 request body 类型。
v2.2 兼容会话同步参数。失败时重试原请求。与 list 共用 16 个并发名额,整次请求限时 5 秒;最多 1000 个候选频道,每批 200 个。请求最近消息总数超过 10000 条或基础/流式载荷超过 32 MiB 时整次失败。
响应主体
application/json
application/json
application/json
[ { "channel_id": "string", "channel_type": 0, "unread": 0, "timestamp": 0, "last_msg_seq": 0, "last_client_msg_no": "string", "offset_msg_seq": 0, "readed_to_msg_seq": 0, "version": 0, "recents": [ { "header": { "no_persist": 0, "red_dot": 0, "sync_once": 0 }, "setting": 0, "message_id": 0, "message_idstr": "string", "client_msg_no": "string", "end": 0, "end_reason": 0, "error": "string", "stream_data": "string", "event_meta": { "has_events": true, "completed": true, "event_version": 0, "last_msg_event_seq": 0, "event_count": 0, "open_event_count": 0, "events": [ { "event_key": "string", "status": "string", "last_msg_event_seq": 0, "snapshot": null, "end_reason": 0, "error": "string" } ] }, "event_sync_hint": { "client_msg_no": "string", "from_msg_event_seq": 0 }, "message_seq": 0, "from_uid": "string", "channel_id": "string", "channel_type": 0, "topic": "string", "expire": 0, "timestamp": 0, "payload": "string", "version": "string", "updated_at_ms": 0 } ] }]