fix(protocol): preserve sent media for message history
Keep media sent by the bot available for later history and forwarding, including messages without a server echo. Fixes #462
This commit is contained in:
6 files changed
+51
-5
No files matched your search
@@ -182,5 +182,12 @@ export async function uploadImageMsgInfo(
|
||||
label: 'image',
|
||||
});
|
||||
|
||||
return finalizeMediaMsgInfo(upload, pic);
|
||||
const encoded = finalizeMediaMsgInfo(upload, pic);
|
||||
// Retain successful upload metadata for the caller's self-sent history.
|
||||
Object.assign(element, {
|
||||
md5Hex: image.md5Hex, sha1Hex: image.sha1Hex, fileSize: image.fileSize,
|
||||
fileName: image.fileName, width: image.width, height: image.height,
|
||||
picFormat: image.picFormat, subType: image.subType, summary: image.summary,
|
||||
});
|
||||
return encoded;
|
||||
}
|
||||
Reference in new issue
Block a user