fix(protocol): restore forward image media and drop file receipts

Bot-built merged forwards left hollow NT images after long-msg fetch,
so get_forward_msg returned empty file/url. Decode now rebuilds identity
from md5, ignores stubs, and forward uploads keep a legacy image sibling.

C2C offline-file download receipts were reported as the peer sending a
file. Treat downloadFlag=2 as a receipt and drop it from the chat stream.
This commit is contained in:
DrSmoothl committed 2026-09-12 13:56:55 +08:00
1 parent 455763f109
commit 4379e4838d
10 files changed
+340 -24

No files matched your search

+15
View File
@@ -179,6 +179,21 @@ function parseMsgPushInternal(
}
return false;
}
if (survival === 'drop-receipt') {
log.trace(() => [
'packet_branch serviceCmd=%j seqId=%d branch=offline_file_receipt msgType=%d subType=%d messageSeq=%d',
pkt.serviceCmd,
pkt.seqId,
ctx.head.msgType,
ctx.head.subType,
ctx.head.sequence,
]);
log.debug(
'dropped offline file receipt (kind=%s seq=%d from=%d msgType=%d)',
ev.kind, ctx.head.sequence, ctx.fromUin, ctx.head.msgType,
);
return false;
}
if (survival === 'drop-blank') {
log.trace(() => [
'packet_branch serviceCmd=%j seqId=%d branch=empty_message msgType=%d subType=%d messageSeq=%d',