From e036e70acc83491d03817e5b9a66e52da82edfb0 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Tue, 2 Jun 2026 21:28:44 +0800 Subject: [PATCH] chore(protocol): temp-dump 0x210 subType-61 ptt-trans push body (#79) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Live testing showed the voice-to-text text is delivered via an async push Event 0x210 subType 61 (0x3D), not the sync pttTrans.TransC2CPttReq response (which is a fixed ~137B ack). That push has no static sys_msg_0x210_0x3d handler — its protobuf is registered dynamically by the ptt-trans subsystem, so RE through the std::function callback chain is impractical. Dump the raw subType-61 body (fromUin + len + hex) once so the wire format can be decoded from ground truth, then implement the real decoder + request/await correlation. Temporary — to be replaced by the actual decoder. --- .../protocol/src/msg-push/decoders/event-0x210.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/protocol/src/msg-push/decoders/event-0x210.ts b/packages/protocol/src/msg-push/decoders/event-0x210.ts index 31d94e56..ad6071af 100644 --- a/packages/protocol/src/msg-push/decoders/event-0x210.ts +++ b/packages/protocol/src/msg-push/decoders/event-0x210.ts @@ -54,6 +54,20 @@ export const decodeEvent0x210: MsgPushDecoder = (ctx) => { // until someone maps the schema. return []; } + if (ctx.head.subType === 61) { + // TEMP capture aid (#79 语音转文字): subType 61 (0x3D) is QQ-NT's ptt + // voice-to-text result push. Its protobuf wire shape is registered + // dynamically by the ptt-trans subsystem (no static sys_msg_0x210_0x3d + // handler), so we dump the raw body once to decode it from ground truth. + // Replace with a proper decoder + correlation once mapped. + unknownLog.info( + 'Event0x210 ptt-trans(subType=61) fromUin=%s len=%d hex=%s', + String(ctx.fromUin ?? ''), + ctx.content?.length ?? 0, + ctx.content ? Buffer.from(ctx.content).toString('hex') : '', + ); + return []; + } unknownLog.debug('Event0x210 unknown subType=%d', ctx.head.subType); return []; };