跳转到主要内容
POST
/
conversations
/
clearUnread
curl -X POST "http://localhost:5001/conversations/clearUnread" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "user123",
    "channel_id": "group123",
    "channel_type": 2,
    "message_seq": 1001
  }'
{
  "status": "ok"
}

概述

清除指定会话的未读消息计数,将未读数量重置为 0。

请求体

uid
string
required
用户 ID
channel_id
string
required
频道 ID
channel_type
integer
required
频道类型
  • 1 - 个人频道
  • 2 - 群组频道
message_seq
integer
消息序列号,指定清除到哪条消息为止
curl -X POST "http://localhost:5001/conversations/clearUnread" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "user123",
    "channel_id": "group123",
    "channel_type": 2,
    "message_seq": 1001
  }'
{
  "status": "ok"
}

响应字段

status
string
required
操作状态,成功时返回 "ok"

状态码

状态码说明
200未读消息清除成功
400请求参数错误
403没有操作权限
404会话不存在
500服务器内部错误