WuKongIM Docs

拉取单频道消息修改

编辑此页报告文档问题

接口边界

  • 调用方:仅限受信业务后端
  • 作用域:仅在进入、重连或继续查看当前频道时同步;不是所有会话的更新发现接口。
  • 成功判定:先获得基线再读取可见历史;more=true 时继续分页,即使 updates 为空。消息与游标在同一事务合并;旧消息修改不能覆盖新末条摘要。
  • 恢复:reset_required=true 时按新基线重载可见历史;503 保留原游标并退避重试。忽略旧恢复代数的延迟响应。
POST/channel/messageupdates

先用空游标获取基线,再加载历史;拉完 more 分页,在同一事务中合并版本并保存游标。此接口返回最新状态。

请求主体

application/json

先用空游标获取基线,再加载历史;拉完 more 分页,在同一事务中合并版本并保存游标。此接口返回最新状态。

TypeScript 定义

在 TypeScript 中使用 request body 类型。

拉取当前可见的单个频道的最新修改。

响应主体

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

{  "updates": [    {      "header": {        "no_persist": 0,        "red_dot": 0,        "sync_once": 0      },      "setting": 0,      "message_id": "string",      "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": "string",      "from_uid": "string",      "channel_id": "string",      "channel_type": 0,      "topic": "string",      "expire": 0,      "timestamp": 0,      "payload": "string",      "version": "string",      "updated_at_ms": 0    }  ],  "next_update_cursor": "string",  "more": true,  "reset_required": true}