mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-25 10:58:19 +01:00
Normalize message attachments
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// Copyright 2019 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
import { omit } from 'lodash';
|
||||
import * as log from '../logging/log';
|
||||
import * as Bytes from '../Bytes';
|
||||
import type { AttachmentDownloadJobTypeType } from '../types/AttachmentDownload';
|
||||
@@ -340,7 +341,7 @@ export async function addAttachmentToMessage(
|
||||
if (thumbnail !== newThumbnail) {
|
||||
handledInEditHistory = true;
|
||||
}
|
||||
return { ...item, thumbnail: newThumbnail };
|
||||
return { ...item, thumbnail: omit(newThumbnail, 'thumbnail') };
|
||||
}),
|
||||
},
|
||||
};
|
||||
@@ -362,7 +363,7 @@ export async function addAttachmentToMessage(
|
||||
|
||||
return {
|
||||
...item,
|
||||
thumbnail: maybeReplaceAttachment(thumbnail),
|
||||
thumbnail: maybeReplaceAttachment(omit(thumbnail, 'thumbnail')),
|
||||
};
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user