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:
10 files changed
+340
-24
No files matched your search
@@ -259,7 +259,8 @@ export const ELEMENT_CODECS = {
|
||||
const url = ctx.imageUrlResolver ? await ctx.imageUrlResolver(element, ctx.isGroup) : (element.imageUrl ?? '');
|
||||
const data: JsonObject = {
|
||||
url,
|
||||
file: element.fileId ?? '',
|
||||
file: element.fileId
|
||||
|| (element.md5Hex ? `${element.md5Hex.toLowerCase()}.png` : ''),
|
||||
sub_type: element.subType ?? 0,
|
||||
summary: element.summary ?? '',
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user