mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
fix: make sure we include width and height when sending attachments
This commit is contained in:
parent
b06944fc4b
commit
dcf9212b07
3 changed files with 6 additions and 0 deletions
|
@ -56,6 +56,8 @@ async function uploadToFileServer(params: UploadParams): Promise<AttachmentPoint
|
|||
fileName: attachment.fileName,
|
||||
flags: attachment.flags,
|
||||
caption: attachment.caption,
|
||||
width: attachment.width,
|
||||
height: attachment.height,
|
||||
};
|
||||
|
||||
let attachmentData: ArrayBuffer;
|
||||
|
|
|
@ -36,6 +36,8 @@ async function uploadV3(params: UploadParamsV2): Promise<AttachmentPointerWithUr
|
|||
fileName: attachment.fileName,
|
||||
flags: attachment.flags,
|
||||
caption: attachment.caption,
|
||||
width: attachment.width && isFinite(attachment.width) ? attachment.width : undefined,
|
||||
height: attachment.height && isFinite(attachment.height) ? attachment.height : undefined,
|
||||
};
|
||||
|
||||
const paddedAttachment: ArrayBuffer = !openGroup
|
||||
|
|
|
@ -264,6 +264,8 @@ export type Attachment = {
|
|||
flags?: SignalService.AttachmentPointer.Flags;
|
||||
contentType?: MIME.MIMEType;
|
||||
size?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
data: ArrayBuffer;
|
||||
} & Partial<AttachmentSchemaVersion3>;
|
||||
|
||||
|
|
Loading…
Reference in a new issue