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) {
|
if (!thumbnail) {
|
||||||
return {
|
return {
|
||||||
contentType: attachment.contentType,
|
contentType: attachment.contentType,
|
||||||
|
fileName: attachment.fileName,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,6 @@ import * as reactionUtil from '../reactions/util';
|
||||||
import * as Errors from '../types/errors';
|
import * as Errors from '../types/errors';
|
||||||
import type { AttachmentType } from '../types/Attachment';
|
import type { AttachmentType } from '../types/Attachment';
|
||||||
import { isImage, isVideo } from '../types/Attachment';
|
import { isImage, isVideo } from '../types/Attachment';
|
||||||
import { stringToMIMEType } from '../types/MIME';
|
|
||||||
import * as MIME from '../types/MIME';
|
import * as MIME from '../types/MIME';
|
||||||
import { ReadStatus } from '../messages/MessageReadStatus';
|
import { ReadStatus } from '../messages/MessageReadStatus';
|
||||||
import type { SendStateByConversationId } from '../messages/MessageSendState';
|
import type { SendStateByConversationId } from '../messages/MessageSendState';
|
||||||
|
@ -1553,16 +1552,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
||||||
firstAttachment.thumbnail = null;
|
firstAttachment.thumbnail = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (!firstAttachment || !firstAttachment.contentType) {
|
||||||
!firstAttachment ||
|
|
||||||
!firstAttachment.contentType ||
|
|
||||||
(!GoogleChrome.isImageTypeSupported(
|
|
||||||
stringToMIMEType(firstAttachment.contentType)
|
|
||||||
) &&
|
|
||||||
!GoogleChrome.isVideoTypeSupported(
|
|
||||||
stringToMIMEType(firstAttachment.contentType)
|
|
||||||
))
|
|
||||||
) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1599,6 +1589,10 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
||||||
...thumbnail,
|
...thumbnail,
|
||||||
copied: true,
|
copied: true,
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
firstAttachment.contentType = queryFirst.contentType;
|
||||||
|
firstAttachment.fileName = queryFirst.fileName;
|
||||||
|
firstAttachment.thumbnail = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue