feat(onebot): TierB ③ followup — doubt-buddy reject path (delDoubtBuddyReq)
set_doubt_friends_add_request with approve:false now rejects/declines via
delDoubtBuddyReq instead of erroring. RE'd from QQNT wrapper.linux.node
(DoubtBuddyDelWorker ctor sub_3F3F320 → OIDB 0xd69_0; EncodeRequest
sub_3F3E860 body {1: varint const 3 (op discriminator; get uses 1),
3:{1: string uid}}, uid from kernel attr 21001). uin-form (reserved=1).
Adversarially IDA-verified; byte-oracle locks the tags. Split out as its
own commit because the approve-only 0xd69_0 work was already pushed.
This commit is contained in:
8 files changed
+114
-15
No files matched your search
@@ -943,11 +943,13 @@ describe('extended-actions / TierB ③ share + doubt + robot-option', () => {
|
||||
expect(res).toMatchObject({ status: 'ok' });
|
||||
});
|
||||
|
||||
it('set_doubt_friends_add_request rejects approve:false instead of silently approving', async () => {
|
||||
it('set_doubt_friends_add_request with approve:false calls rejectDoubtRequest (not approve)', async () => {
|
||||
const approveDoubtRequest = vi.fn(async () => {});
|
||||
const bridge = fakeBridge({ apis: { friend: { approveDoubtRequest } } });
|
||||
const rejectDoubtRequest = vi.fn(async () => {});
|
||||
const bridge = fakeBridge({ apis: { friend: { approveDoubtRequest, rejectDoubtRequest } } });
|
||||
const res = await makeHandler(fakeCtx(bridge)).handle('set_doubt_friends_add_request', { flag: 'u_abc', approve: false });
|
||||
expect(res.status).toBe('failed');
|
||||
expect(res).toMatchObject({ status: 'ok' });
|
||||
expect(rejectDoubtRequest).toHaveBeenCalledWith('u_abc');
|
||||
expect(approveDoubtRequest).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user