Export long message attachments

This commit is contained in:
trevor-signal 2024-09-23 15:24:41 -04:00 committed by GitHub
parent a9406a7914
commit 511fc9c1a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 423 additions and 82 deletions

View file

@ -5,7 +5,7 @@ import type { KeyboardEvent } from 'react';
import React from 'react';
import type { AttachmentType } from '../../types/Attachment';
import { canBeDownloaded } from '../../types/Attachment';
import { canBeDownloaded, isDownloaded } from '../../types/Attachment';
import { getSizeClass } from '../emoji/lib';
import type { ShowConversationType } from '../../state/ducks/conversations';
@ -35,7 +35,7 @@ export type Props = {
text: string;
textAttachment?: Pick<
AttachmentType,
'pending' | 'digest' | 'key' | 'wasTooBig'
'pending' | 'digest' | 'key' | 'wasTooBig' | 'path'
>;
};
@ -97,6 +97,7 @@ export function MessageBody({
} else if (
textAttachment &&
canBeDownloaded(textAttachment) &&
!isDownloaded(textAttachment) &&
kickOffBodyDownload
) {
endNotification = (