The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/definition/IMessage/MessageAttachment/Files/ImageAttachmentProps.ts

16 lines
570 B

import { MessageAttachmentBase } from '../MessageAttachmentBase';
import { Dimensions } from './Dimensions';
import { FileAttachmentProps } from './FileAttachmentProps';
import { FileProp } from './FileProp';
export type ImageAttachmentProps = {
image_dimensions?: Dimensions;
image_preview?: string;
image_url: string;
image_type: string;
image_size?: number;
file?: FileProp;
} & MessageAttachmentBase;
export const isFileImageAttachment = (attachment: FileAttachmentProps): attachment is ImageAttachmentProps & { type: 'file' } =>
'image_url' in attachment;