Rocket.Chat.Apps-engine icon indicating copy to clipboard operation
Rocket.Chat.Apps-engine copied to clipboard

Ability to set a height / width on ISlashCommandPreviewItem

Open wreiske opened this issue 6 years ago • 0 comments

I'm working on a few new apps that use ISlashCommandPreviewItem to display images. I noticed there is not a good way to set a height/width for the images being displayed.

image

In some cases, the source images will not have a "thumbnail" preview. Being able to set a fit height and width would be great.

image

export interface ISlashCommandPreviewItem {
    /** An internal id value of the preview item. */
    id: string;
    /** The type of preview item this is. */
    type: SlashCommandPreviewItemType;
    /** The value of this preview item, url or text (could even be base64). */
    value: string;
    /** If SlashCommandPreviewItemType != Text or other, allow setting height and width. */
    height: number;
    width: number;
}

wreiske avatar Feb 02 '19 05:02 wreiske