Export long message attachments
This commit is contained in:
parent
a9406a7914
commit
511fc9c1a0
20 changed files with 423 additions and 82 deletions
|
@ -1857,11 +1857,17 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
const ourPni = window.textsecure.storage.user.getCheckedPni();
|
||||
const ourServiceIds: Set<ServiceIdString> = new Set([ourAci, ourPni]);
|
||||
|
||||
const [longMessageAttachments, normalAttachments] = partition(
|
||||
dataMessage.attachments ?? [],
|
||||
attachment => MIME.isLongMessage(attachment.contentType)
|
||||
);
|
||||
|
||||
window.MessageCache.toMessageAttributes(this.attributes);
|
||||
message.set({
|
||||
id: messageId,
|
||||
attachments: dataMessage.attachments,
|
||||
attachments: normalAttachments,
|
||||
body: dataMessage.body,
|
||||
bodyAttachment: longMessageAttachments[0],
|
||||
bodyRanges: dataMessage.bodyRanges,
|
||||
contact: dataMessage.contact,
|
||||
conversationId: conversation.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue