refactor(protocol): move roster refresh into the packet pipeline

Replace the shallow refreshMemberCache adapter with fetchGroupList
and fetchGroupMemberList ports. Skip, swallow, and coalesce stay
next to the join/leave/admin trigger.
This commit is contained in:
DrSmoothl committed 2026-08-16 23:18:04 +08:00
1 parent 9772d4f0bf
commit 206727f823
7 files changed
+265 -44

No files matched your search

+4 -2
View File
@@ -494,7 +494,8 @@ describe('parseMsgPush Event0x210 subType=364 (friend remark synchronization)',
const pipeline = new IncomingPacketPipeline({
identity,
events: new BridgeEventBus(),
refreshMemberCache: vi.fn(async () => false),
fetchGroupList: vi.fn(async () => {}),
fetchGroupMemberList: vi.fn(async () => {}),
resolveGroupJoinRequest: vi.fn(async () => null),
});
pipeline.registerCmd(MSG_PUSH_CMD, parseMsgPush);
@@ -942,7 +943,8 @@ describe('parseMsgPush PkgType 44 (group admin set/unset) keeps the member cache
const pipeline = new IncomingPacketPipeline({
identity,
events: new BridgeEventBus(),
refreshMemberCache: vi.fn(async () => false),
fetchGroupList: vi.fn(async () => {}),
fetchGroupMemberList: vi.fn(async () => {}),
resolveGroupJoinRequest: vi.fn(async () => null),
});
pipeline.registerCmd(MSG_PUSH_CMD, parseMsgPush);