diff --git a/packages/core/src/bridge/bridge-contacts.ts b/packages/core/src/bridge/bridge-contacts.ts index 23f537f1..d63b10da 100644 --- a/packages/core/src/bridge/bridge-contacts.ts +++ b/packages/core/src/bridge/bridge-contacts.ts @@ -103,6 +103,19 @@ export async function fetchFriendList(bridge: Bridge): Promise { // --------------------------------------------------------------------------- export async function fetchGroupList(bridge: Bridge): Promise { + // 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 { 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 }, },