feat(qzone): send_qzone_msg — publish a text 说说 via web API

First Qzone WRITE path. publishQzoneMsg POSTs a form-urlencoded body to
taotao.qzone.qq.com's emotion_cgi_publish_v6 (proxied through h5.qzone),
g_tk in the query, on the bot's own space. Returns the server-assigned
tid (the handle for later delete/comment/like) + post time.

- Throws on transport failure, non-zero Qzone code (content rejected /
  rate-limited), or a success body with no tid — never reports a publish
  as succeeded without the feed id. Rejects empty content pre-flight.
- 带图 (image) publishing is a later slice (needs the upload CGI first).
- Action carries a风控/限流 caveat: publishing is an active action and
  high frequency is rate-limited by Qzone, same as sending messages.

- core: QzoneApi.publish; onebot: send_qzone_msg action; regen catalog.
- tests: form-body/url/headers lock, empty-content preflight, non-zero
  code throw, missing-tid throw, and bridge self-space threading.
This commit is contained in:
DrSmoothl committed 2026-06-20 01:40:06 +08:00
1 parent b00f5ab759
commit 9f2eb37232
6 files changed
+204 -2

No files matched your search

+35 -1
View File
@@ -4573,6 +4573,40 @@ export const ACTIONS: CatalogAction[] = [
},
"category": "消息"
},
{
"name": "send_qzone_msg",
"aliases": [],
"summary": "发表一条纯文字说说(QQ 空间)",
"readOnly": false,
"params": [
{
"name": "content",
"type": "string",
"required": true,
"schema": {
"type": "string",
"minLength": 1
},
"desc": "说说正文"
}
],
"invariants": [],
"inputSchema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"minLength": 1,
"description": "说说正文"
}
},
"required": [
"content"
],
"additionalProperties": true
},
"category": "空间"
},
{
"name": "set_diy_online_status",
"aliases": [],
@@ -6693,6 +6727,6 @@ export const CATEGORIES: CatalogCategory[] = [
},
{
"category": "空间",
"count": 2
"count": 3
}
];