fix(protocol): correct group membership notices

Derive group increase approval and invitation subtypes from the member-change operation code instead of actor identity.

Treat voluntary leave field 5 as structured metadata and attribute the operation to the departing member so valid notices are not discarded.

Add protocol and OneBot regression coverage for issue #237.
This commit is contained in:
DrSmoothl committed 2026-07-16 19:41:48 +08:00
1 parent 0503af2fcc
commit 0e3bbc6906
6 files changed
+110 -11

No files matched your search

+6
View File
@@ -270,6 +270,12 @@ export interface GroupMemberJoin extends QQEvent {
operatorUin: number;
userUid?: string;
operatorUid?: string;
/**
* Admission mode derived from GroupChange field 4. This is deliberately
* separate from QQ's nested invitation-source enum, which has different
* wire semantics. It is absent on the separate self-join push path.
*/
joinType?: 'approve' | 'invite';
}
export interface GroupMemberLeave extends QQEvent {