Send attachment filenames for non-image/non-video quote attachments
This commit is contained in:
parent
95c3694c6e
commit
fd187a353c
2 changed files with 6 additions and 11 deletions
|
@ -793,6 +793,7 @@ async function uploadMessageQuote({
|
|||
if (!thumbnail) {
|
||||
return {
|
||||
contentType: attachment.contentType,
|
||||
fileName: attachment.fileName,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ import * as reactionUtil from '../reactions/util';
|
|||
import * as Errors from '../types/errors';
|
||||
import type { AttachmentType } from '../types/Attachment';
|
||||
import { isImage, isVideo } from '../types/Attachment';
|
||||
import { stringToMIMEType } from '../types/MIME';
|
||||
import * as MIME from '../types/MIME';
|
||||
import { ReadStatus } from '../messages/MessageReadStatus';
|
||||
import type { SendStateByConversationId } from '../messages/MessageSendState';
|
||||
|
@ -1553,16 +1552,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
firstAttachment.thumbnail = null;
|
||||
}
|
||||
|
||||
if (
|
||||
!firstAttachment ||
|
||||
!firstAttachment.contentType ||
|
||||
(!GoogleChrome.isImageTypeSupported(
|
||||
stringToMIMEType(firstAttachment.contentType)
|
||||
) &&
|
||||
!GoogleChrome.isVideoTypeSupported(
|
||||
stringToMIMEType(firstAttachment.contentType)
|
||||
))
|
||||
) {
|
||||
if (!firstAttachment || !firstAttachment.contentType) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1599,6 +1589,10 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
...thumbnail,
|
||||
copied: true,
|
||||
};
|
||||
} else {
|
||||
firstAttachment.contentType = queryFirst.contentType;
|
||||
firstAttachment.fileName = queryFirst.fileName;
|
||||
firstAttachment.thumbnail = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue