fix(bridge): drop bloated fields from OIDB 0xFE5_2 group-list request
closes #42 On accounts with ~200+ groups, fetchGroupList was asking QQ to fill in every config flag (all 32 bools in config1 plus all 8 in config2) even though our response decoder reads only groupName / memberMax / memberCount / customInfo.remark / a handful of named info fields. QQ NT obligingly packs every requested field into the response. At group counts >= ~200 the payload is large enough to blow the named-pipe write buffer on the QQ side; SnowLuma reads EPIPE and the entire session dies during warmup: WARN [Hook] pipe error: PID=23928 err=read EPIPE INFO [OneBot] session closed: UIN=... WARN [OneBot] failed to load groups for UIN ...: qq_hook client closed Issue #42 reporter (airline233) bisected the breakage to two clusters of unused bool flags: - config1.field5003 (a 5xxx-range expansive descriptor) - the whole of config2 (per-group aux info we don't decode) This commit applies exactly their verified safe combination and inlines a comment so nobody flips them back on without context. The decoded response shape (groupName, memberCount, memberMax, remark, etc.) is unchanged.
This commit is contained in:
@@ -103,6 +103,19 @@ export async function fetchFriendList(bridge: Bridge): Promise<FriendInfo[]> {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export async function fetchGroupList(bridge: Bridge): Promise<QQGroupInfo[]> {
|
||||
// The config flags ask QQ which per-group fields to include in the
|
||||
// response. Asking for everything looks innocent on small accounts
|
||||
// but on ~200+ groups it makes the QQ NT process write a payload
|
||||
// large enough to blow the named-pipe write buffer — we then read
|
||||
// EPIPE and the whole session dies. See issue #42.
|
||||
//
|
||||
// The user-verified safe combination: keep `config1.*` mostly on
|
||||
// (the response decoder pulls groupOwner / memberMax / memberCount /
|
||||
// groupName / description / question / announcement from this
|
||||
// group), but turn off the two costly groups of bools that never
|
||||
// map back to a decoded field:
|
||||
// - config1.field5003 (an expansive 5xxx-range descriptor)
|
||||
// - all of config2 (auxiliary per-group blob the decoder ignores)
|
||||
const allTrue = true;
|
||||
const body = {
|
||||
config: {
|
||||
@@ -114,11 +127,11 @@ export async function fetchGroupList(bridge: Bridge): Promise<QQGroupInfo[]> {
|
||||
question: allTrue, field20: allTrue, field22: allTrue, field23: allTrue,
|
||||
field24: allTrue, field25: allTrue, field26: allTrue, field27: allTrue,
|
||||
field28: allTrue, field29: allTrue, field30: allTrue, field31: allTrue,
|
||||
field32: allTrue, field5001: allTrue, field5002: allTrue, field5003: allTrue,
|
||||
field32: allTrue, field5001: allTrue, field5002: allTrue, field5003: false,
|
||||
},
|
||||
config2: {
|
||||
field1: allTrue, field2: allTrue, field3: allTrue, field4: allTrue,
|
||||
field5: allTrue, field6: allTrue, field7: allTrue, field8: allTrue,
|
||||
field1: false, field2: false, field3: false, field4: false,
|
||||
field5: false, field6: false, field7: false, field8: false,
|
||||
},
|
||||
config3: { field5: allTrue, field6: allTrue },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user