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:
3 files changed
+14
No files matched your search
@@ -744,4 +744,10 @@ describe('extended-actions / get_rkey_server', () => {
|
||||
expect(d.private_rkey).toBe('&rkey=PRIV');
|
||||
expect(d.group_rkey).toBeUndefined();
|
||||
});
|
||||
|
||||
it('fails (not an expired empty shell) when no rkey is available', async () => {
|
||||
const getDownloadRKeys = vi.fn(async () => []);
|
||||
const res = await makeHandler(fakeCtx(fakeBridge(), { getDownloadRKeys })).handle('get_rkey_server', {});
|
||||
expect(res).toMatchObject({ status: 'failed', retcode: 100 });
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user