DrSmoothl
f78431242c
refactor(oidb): migrate friend.ts to namespaces
3 OIDB cmds moved to self-contained namespaces:
- HandleFriendRequest (0xB5D_44) — digit-only flag still
auto-resolves via resolveUserUid
- DeleteFriend (0x126B_0) — verbatim magic constants in the
nested field2 sub-message
(130/109/8/8/50 — server-side
discriminator, MUST stay byte-
equal to NTQQ wire)
- SetFriendRemark (0xB6E_2)
Cache invalidation (fetchFriendList after deletion) stays in the
facade — that side-effect needs `ctx.apis.contacts`, which namespaces
deliberately can't reach.
Tests migrated to assert against bridge.sendRawPacket. 15 new
namespace-level tests covering each invoke branch + serialize edge
cases.
Verification:
- typecheck green
- @snowluma/bridge: 15 files / 133 tests
- friend.test.ts: 5/5
Wire bytes unchanged.
2026-05-22 23:33:22 +08:00
..
2026-05-22 23:33:22 +08:00
2026-05-21 17:33:35 +08:00
2026-05-22 23:33:22 +08:00
2026-05-22 22:08:45 +08:00
2026-05-22 23:15:20 +08:00
2026-05-21 17:33:35 +08:00
2026-05-21 17:33:35 +08:00
2026-05-21 17:33:35 +08:00
2026-05-21 17:33:35 +08:00
2026-05-21 17:33:35 +08:00
2026-05-21 17:33:35 +08:00
2026-05-21 17:33:35 +08:00