feat(protocol): decode online device snapshots

Decode Event 0x210 subtype 349 into typed online-device snapshots, including QQ-compatible low-byte client type normalization and one-entry-per-device-category projection.

Keep replacement snapshots outside system-message deduplication, reject malformed device identities observably, and add wire-level regressions for complete, packed, repeated, and invalid payloads. Live verification covered mobile account switching without requiring native changes.
This commit is contained in:
DrSmoothl committed 2026-07-19 19:19:58 +08:00
1 parent e6a69b05a7
commit b92c8ad881
8 files changed
+279 -3

No files matched your search

+24
View File
@@ -95,6 +95,30 @@ export interface FriendRequest {
info?: pb<1, FriendRequestInfo>;
}
/**
* Online-device snapshot carried by Event 0x210 / subType 349.
*
* Field numbers were recovered from QQ NT's OnRecvOnLineDev decoder. The
* outer four fields describe the current client, while field 5 contains the
* online-device entries exposed by getOnLineDev's kernel cache.
*/
export interface OnlineDeviceNotifyItem {
appId?: pb<1, uint_32>;
instanceId?: pb<2, uint_32>;
/** Packed terminal value; QQ normalizes it to the low byte before use. */
clientType?: pb<3, uint_32>;
platform?: pb<4, uint_32>;
deviceName?: pb<5, string>;
}
export interface OnlineDeviceNotify {
appId?: pb<1, uint_32>;
instanceId?: pb<2, uint_32>;
clientType?: pb<3, uint_32>;
platform?: pb<4, uint_32>;
devices?: pb_repeated<5, OnlineDeviceNotifyItem>;
}
export interface FriendRecallTipInfo {
tip?: pb<2, string>;
}