refactor(protocol): keep Decoder a pure parse of MsgPush events

Decoder used to write Identity: decodeGroupAdmin patched member roles
and decodeFriendMessage stashed invite-card msgseq. That split
observation with IncomingPacketPipeline.rememberEventIdentity and put
pending-application state on Identity.

Decoder now only returns events. Invite-card groupUin/msgseq ride on
FriendMessage; the live pipeline writes them to ContactsApi through
an optional port. Role self-heal for #93 stays in
rememberEventIdentity. History and forward decode do not write.
Identity no longer stores invite-card sequences.

Live #93 and #125 behavior is unchanged.
This commit is contained in:
DrSmoothl committed 2026-08-16 18:22:41 +08:00
1 parent fea1996e46
commit 226b48fd7a
12 files changed
+148 -79

No files matched your search

+5
View File
@@ -278,6 +278,11 @@ export interface FriendMessage extends QQEvent {
sequenceAuthoritative?: boolean;
msgId: number;
elements: MessageElement[];
/** Parsed `qun.invite` card, if this private message is one. Live
* IncomingPacketPipeline copies these onto the pending-application
* store. Not OneBot wire. */
inviteCardGroupUin?: number;
inviteCardSequence?: number;
}
export interface GroupMessage extends QQEvent {