fix(onebot): get_rkey_server fails on empty rkey set; document rename return

Adversarial Wave 2 pass (no blockers): get_rkey_server now returns
ACTION_FAILED instead of an 'expired_time=now, no keys' shell when no
download rkey is available, so a caching caller can't misread 'unavailable'
as 'valid-but-expired'. Added an empty-list test. Annotated rename_group_file's
{ok:true} body as a deliberate NapCat-parity deviation from sibling file ops.
This commit is contained in:
DrSmoothl committed 2026-06-18 00:26:34 +08:00
1 parent 7625c18768
commit f936515a59
3 files changed
+14

No files matched your search

@@ -112,6 +112,8 @@ export const actions = [
},
run: async (p, ctx) => {
await ctx.bridge.apis.groupFile.rename(p.group_id, p.file_id, p.current_parent_directory || '/', p.new_name);
// {ok:true} 刻意对齐 NapCat RenameGroupFile 的返回体,偏离 SnowLuma 同类
// 文件写操作(move/delete 返回空 data)——为 NapCat 客户端 drop-in 兼容。
return okResponse({ ok: true });
},
}),