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:
DrSmoothl committed 2026-06-18 22:18:08 +08:00
1 parent 43cd4a0b99
commit 7ea1ffb497
8 files changed
+114 -15

No files matched your search

@@ -3,8 +3,8 @@
// {1:uid, 2:uid, [3:u32], [4:str]} — tags 3/4 emitted only when present, and
// NapCat passes empty str1/str2, so the approve flow is just {1:uid, 2:uid}.
// Same OIDB cmd as the getter; the server discriminates by body shape.
// uin-form OIDB (envelope reserved=1). NapCat only supports approve (no
// reject — rejection would be a separate delDoubtBuddyReq cmd, not RE'd here).
// uin-form OIDB (envelope reserved=1). The reject/decline path is a separate
// cmd (delDoubtBuddyReq) — see sibling reject-doubt-buddy-req.ts.
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
import type { OidbBase, OidbEmpty } from '@snowluma/proto-defs/oidb';
@@ -0,0 +1,36 @@
// 0xd69_0 — delDoubtBuddyReq: delete/reject (decline) a doubtful friend-add
// request. RE'd from QQNT doubt_buddy_del_worker.cc (worker ctor sub_3F3F320
// → cmd 0xd69 sub 0; EncodeRequest sub_3F3E860 writes {1: const 3, 3:{1:uid}}).
// The top-level tag-1 constant 3 is the op discriminator (getDoubtBuddyReq
// uses 1). Same OIDB cmd as get/approval; the server routes by body shape.
// uin-form OIDB (envelope reserved=1).
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
import type { OidbBase, OidbEmpty } from '@snowluma/proto-defs/oidb';
import type { OidbDoubtDelReq } from '@snowluma/proto-defs/oidb-actions/doubt-buddy';
import { invokeOidb, type OidbSender } from '../../oidb-service';
export namespace RejectDoubtBuddyReq {
export const command = 0xD69;
export const subCommand = 0;
export const uinForm = true;
export interface Params { uid: string }
export type Deps = OidbSender;
export const serialize = (_ctx: Deps, p: Params): OidbDoubtDelReq => ({
field1: 3,
inner: { uid: p.uid },
});
export const deserialize = (_ctx: Deps, _: OidbEmpty): void => {};
export const encode = (env: OidbBase<OidbDoubtDelReq>): Uint8Array =>
protobuf_encode<OidbBase<OidbDoubtDelReq>>(env);
export const decode = (bytes: Uint8Array): OidbBase<OidbEmpty> =>
protobuf_decode<OidbBase<OidbEmpty>>(bytes);
export const invoke = (deps: Deps, params: Params): Promise<void> =>
invokeOidb(deps, RejectDoubtBuddyReq, params);
}