mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Skip invalid attachments and make function sync
This commit is contained in:
@@ -176,7 +176,12 @@ exports._replaceUnicodeOrderOverridesSync = (attachment) => {
|
||||
exports.replaceUnicodeOrderOverrides = async attachment =>
|
||||
exports._replaceUnicodeOrderOverridesSync(attachment);
|
||||
|
||||
exports.removeSchemaVersion = async (attachment) => {
|
||||
exports.removeSchemaVersion = (attachment) => {
|
||||
if (!exports.isValid(attachment)) {
|
||||
console.log('Attachment.removeSchemaVersion: Invalid input attachment:', attachment);
|
||||
return attachment;
|
||||
}
|
||||
|
||||
const attachmentWithoutSchemaVersion = Object.assign({}, attachment);
|
||||
delete attachmentWithoutSchemaVersion.schemaVersion;
|
||||
return attachmentWithoutSchemaVersion;
|
||||
|
||||
Reference in New Issue
Block a user