refactor(bridge): split MsgPush handler into per-PkgType decoders
The 885-line msg-push-handler.ts is replaced by bridge/msg-push/: 8 per-PkgType decoders plus MsgPushRegistry (single decoder per PkgType, catch + log on error), MsgPushContext (header decoded once at entry), and rich-body-decoder (one deep function hides ~400 lines of element conversion shared by all three message types). parseMsgPush(pkt, identity) signature preserved; existing tests pass with an import-path change only.
This commit is contained in:
18 files changed
+1136
-888
No files matched your search
@@ -7,7 +7,7 @@ import type { Bridge } from '../bridge';
|
||||
import { gunzipSync, gzipSync } from 'zlib';
|
||||
import { protoDecode, protoEncode } from '../../protobuf/decode';
|
||||
import { buildSendElems } from '../element-builder';
|
||||
import { parseMsgPush } from '../msg-push-handler';
|
||||
import { parseMsgPush } from '../msg-push';
|
||||
import type { ForwardNodePayload } from '../events';
|
||||
import type { PacketInfo } from '../../protocol/types';
|
||||
import {
|
||||
|
||||
Reference in new issue
Block a user