Merge pull request #1874 from Bilb/fix-attachment-caption

fix caption for attachments not displayed once sent
pull/1876/head
Audric Ackermann 4 years ago committed by GitHub
commit a172f234f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -688,6 +688,7 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
screenshot,
thumbnail,
fileName,
caption,
} = attachment;
const isVoiceMessage =
@ -696,6 +697,7 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
return {
id,
contentType,
caption,
size: size || 0,
width: width || 0,
height: height || 0,

@ -136,6 +136,7 @@ export type PropsForSearchResults = {
export type PropsForAttachment = {
id: number;
contentType: string;
caption?: string;
size: number;
width?: number;
height?: number;

@ -109,6 +109,7 @@ export async function getFile(attachment: StagedAttachmentType, maxMeasurements?
const scaled = await autoScale(attachment, maxMeasurements);
const fileRead = await readFile(scaled);
return {
caption: attachment.caption,
...fileRead,
url: undefined,
flags: attachmentFlags || null,

Loading…
Cancel
Save