fix caption for attachments not displayed once sent
This commit is contained in:
parent
de1475b3bb
commit
7b93d5df9a
|
@ -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…
Reference in New Issue