mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 13:40:47 +00:00
Add Attachment.removeSchemaVersion
This commit is contained in:
@@ -176,6 +176,12 @@ exports._replaceUnicodeOrderOverridesSync = (attachment) => {
|
||||
exports.replaceUnicodeOrderOverrides = async attachment =>
|
||||
exports._replaceUnicodeOrderOverridesSync(attachment);
|
||||
|
||||
exports.removeSchemaVersion = async (attachment) => {
|
||||
const attachmentWithoutSchemaVersion = Object.assign({}, attachment);
|
||||
delete attachmentWithoutSchemaVersion.schemaVersion;
|
||||
return attachmentWithoutSchemaVersion;
|
||||
};
|
||||
|
||||
// Public API
|
||||
const toVersion1 = exports.withSchemaVersion(1, autoOrientJPEG);
|
||||
const toVersion2 = exports.withSchemaVersion(2, exports.replaceUnicodeOrderOverrides);
|
||||
|
||||
Reference in New Issue
Block a user