Export long message attachments
This commit is contained in:
parent
a9406a7914
commit
511fc9c1a0
20 changed files with 423 additions and 82 deletions
|
@ -6618,7 +6618,8 @@ function getExternalFilesForMessage(message: MessageType): {
|
|||
externalAttachments: Array<string>;
|
||||
externalDownloads: Array<string>;
|
||||
} {
|
||||
const { attachments, contact, quote, preview, sticker } = message;
|
||||
const { attachments, bodyAttachment, contact, quote, preview, sticker } =
|
||||
message;
|
||||
const externalAttachments: Array<string> = [];
|
||||
const externalDownloads: Array<string> = [];
|
||||
|
||||
|
@ -6653,6 +6654,16 @@ function getExternalFilesForMessage(message: MessageType): {
|
|||
}
|
||||
});
|
||||
|
||||
if (bodyAttachment?.path) {
|
||||
externalAttachments.push(bodyAttachment.path);
|
||||
}
|
||||
|
||||
for (const editHistory of message.editHistory ?? []) {
|
||||
if (editHistory.bodyAttachment?.path) {
|
||||
externalAttachments.push(editHistory.bodyAttachment.path);
|
||||
}
|
||||
}
|
||||
|
||||
if (quote && quote.attachments && quote.attachments.length) {
|
||||
forEach(quote.attachments, attachment => {
|
||||
const { thumbnail } = attachment;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue