fix(msg-push): Event0x210 subType=38 is the troop-shortcut-bar push, not friend-related
Earlier this commit acknowledged subType 38 as a placeholder
"FriendGrayTipInfo" because none of the LagrangeDev-family projects
(Lagrange V2 / lagrange-python / LagrangeGo / acidify) have a
handler for it — they all just fall through with a generic
"unknown subType" debug log. The "best guess" gray-tip framing was
wrong.
A contributor traced it through the decompiled stock QQ Android
client to `com.tencent.imcore.message.ext.codec.decoder.msgType0x210
.SubType0x26` (tsuzcx/qq_apk @ afe46ef). The payload is
`submsgtype0x26.MsgBody` dispatching on `uint32_sub_cmd`:
- 0x1 → `UpdateAppUnreadNum`: a list of
`{group_code, app_id, unread_num}` keeping group-internal
"mini-app" badge counts (e.g. `appId=101846662` / `101896870`
for the troop shortcut bar) in sync.
- 0x3 → `UpdateDiscussAppInfo`: `{conf_uin, app_tip_notify.text}`
discussion-group app tips, routed through `getGAudioHandler()`.
- 0x4 → delegated to the troop online-push handler.
None of these have a meaningful OneBot mapping — they're
QQ-client-UI state pushes (badge counts, in-app tips), not
conversation events. Rename the enum entry to `GroupAppStatePush`
to reflect the actual semantics, cite the decompiled source
inline, and keep the silent-drop behaviour from the previous
attempt. Tests + decoder routing follow the rename.
628/628 tests pass (unchanged), typecheck clean.
This commit is contained in:
3 files changed
+93
No files matched your search
@@ -25,6 +25,11 @@ export const decodeEvent0x210: MsgPushDecoder = (ctx) => {
|
||||
case Event0x210SubType.FriendRequestNotice: return decodeFriendRequest(ctx);
|
||||
case Event0x210SubType.FriendRecallNotice: return decodeFriendRecall(ctx);
|
||||
case Event0x210SubType.FriendPokeNotice: return decodeFriendPoke(ctx);
|
||||
case Event0x210SubType.GroupAppStatePush:
|
||||
// QQ-client-internal troop shortcut bar / discussion app state
|
||||
// push — no OneBot-level event. See enum comment for the
|
||||
// decompiled-source breakdown of the sub_cmd dispatch.
|
||||
return [];
|
||||
}
|
||||
unknownLog.debug('Event0x210 unknown subType=%d', ctx.head.subType);
|
||||
return [];
|
||||
|
||||
@@ -31,4 +31,29 @@ export enum Event0x210SubType {
|
||||
FriendRequestNotice = 35,
|
||||
FriendRecallNotice = 138,
|
||||
FriendPokeNotice = 290,
|
||||
/**
|
||||
* Group-app state push (troop shortcut bar / discussion app).
|
||||
*
|
||||
* Sourced from the decompiled stock QQ Android client decoder at
|
||||
* `com.tencent.imcore.message.ext.codec.decoder.msgType0x210.SubType0x26`
|
||||
* (tsuzcx/qq_apk @ afe46ef). The payload is `submsgtype0x26.MsgBody`
|
||||
* dispatching on `uint32_sub_cmd`:
|
||||
*
|
||||
* - 0x1 → `UpdateAppUnreadNum`: a list of
|
||||
* `{group_code, app_id, unread_num}` entries the QQ client uses
|
||||
* to keep group-internal "mini-app" badges (e.g. `appId=101846662`
|
||||
* / `101896870` for the shortcut bar) in sync.
|
||||
* - 0x3 → `UpdateDiscussAppInfo`: `{conf_uin, app_tip_notify.text}`
|
||||
* for discussion-group app tips, routed to `getGAudioHandler()`.
|
||||
* - 0x4 → delegated to the troop online-push handler.
|
||||
*
|
||||
* None of these have a OneBot event mapping — they're QQ-client-UI
|
||||
* state pushes (unread badges, in-app tips), not user-visible
|
||||
* conversation events. Acknowledge the subType so it doesn't keep
|
||||
* showing up as "unknown" in debug logs and drop it silently.
|
||||
* Lagrange V2 / lagrange-python / LagrangeGo / acidify all also
|
||||
* fall through on this one because they don't surface the shortcut
|
||||
* bar either.
|
||||
*/
|
||||
GroupAppStatePush = 38,
|
||||
}
|
||||
Reference in new issue
Block a user