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:
7 files changed
+265
-44
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user