feat(qzone): delete_qzone_msg — delete a 说说 by tid via web API
deleteQzoneMsg POSTs a form-urlencoded tid to taotao.qzone.qq.com's emotion_cgi_delete_v6 (proxied through h5.qzone), on the bot's own space. Success has no positive payload beyond code 0, so the contract is throw-on-non-zero-code (foreign/unknown tid or auth failure); the server only deletes feeds the hostUin owns. Rejects empty tid pre-flight. - core: QzoneApi.delete; onebot: delete_qzone_msg action; regen catalog. - tests: tid form-body/url/headers lock, empty-tid preflight, non-zero code throw, and bridge self-space threading.
This commit is contained in:
6 files changed
+159
-2
No files matched your search
@@ -67,6 +67,24 @@ export const actions = [
|
||||
}
|
||||
},
|
||||
}),
|
||||
|
||||
// delete_qzone_msg — 删除机器人自己空间的一条说说(按 tid)。写操作。
|
||||
defineAction({
|
||||
name: 'delete_qzone_msg',
|
||||
summary: '删除一条说说(QQ 空间,按 tid)',
|
||||
params: {
|
||||
tid: f.string({ allowEmpty: false }).describe('说说 tid(来自 get_qzone_msg_list / send_qzone_msg)'),
|
||||
},
|
||||
run: async (p, ctx) => {
|
||||
try {
|
||||
await ctx.bridge.apis.qzone.delete(p.tid);
|
||||
return okResponse(null);
|
||||
} catch (error) {
|
||||
const message = error instanceof Error ? error.message : 'failed to delete qzone msg';
|
||||
return failedResponse(RETCODE.INTERNAL_ERROR, message);
|
||||
}
|
||||
},
|
||||
}),
|
||||
];
|
||||
|
||||
export function register(h: ApiHandler, ctx: ApiActionContext): void {
|
||||
|
||||
Reference in new issue
Block a user