docs: 写明互关后取关会删除双方好友边

单关不加好友,互关才成为好友,取关不是只删一方。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
DESKTOP-L8OUL9F\gfl0034 2026-10-18 22:06:13 +08:00
parent 9dff1141d4
commit cfa30e270b

View File

@ -1278,56 +1278,6 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/Envelope" $ref: "#/components/schemas/Envelope"
/v1/follows/{uid}:
get:
tags: [friends]
summary: 查看关注状态
description: |
当前用户是否关注对方。无请求体。`data` 含 `uid`、`following`、`followed_by`、`mutual`、`friend`。
这是关注关系,不是新的消息接口。
operationId: getFollow
parameters:
- $ref: "#/components/parameters/FriendUID"
responses:
"200":
description: 统一 envelope
content:
application/json:
schema:
$ref: "#/components/schemas/Envelope"
put:
tags: [friends]
summary: 关注
description: |
无请求体。只增加一条单向关注。只有一方关注时 `mutual` 与 `friend` 都为 false,不会成为好友。
若对方已经关注自己,这次关注使双方互相关注,则自动写入已有双向好友边(来源 `4`),并沿用成为好友的系统消息。已经是好友时不重复写这条系统消息。
operationId: followUser
parameters:
- $ref: "#/components/parameters/FriendUID"
responses:
"200":
description: |
统一 envelope。`data.following` 为 true。仅一方关注时 `mutual=false`、`friend=false`。互关成功时 `mutual=true`、`friend=true`。
content:
application/json:
schema:
$ref: "#/components/schemas/Envelope"
delete:
tags: [friends]
summary: 取消关注
description: |
只删除自己这一条关注。若因此不再互相关注,删除双方好友边。不删除历史消息。
只有一方关注时取消关注,不改动已经存在的好友关系。
operationId: unfollowUser
parameters:
- $ref: "#/components/parameters/FriendUID"
responses:
"200":
description: 统一 envelope。`data.following` 为 false。不再互关时 `friend` 为 false。
content:
application/json:
schema:
$ref: "#/components/schemas/Envelope"
/v1/follows/{uid}: /v1/follows/{uid}:
get: get:
tags: [friends] tags: [friends]