fix(app): put jxl and other image attachments in the mosaic (#2902)

This commit is contained in:
Hampus
2026-09-22 21:18:39 +02:00
committed by GitHub
parent c92e5d03a7
commit 82b2f4ec5e
@@ -4,15 +4,12 @@ import type {MessageAttachment} from '@fluxer/schema/src/domains/message/Message
export const ATTACHMENT_CARD_WIDTH = 400;
const IMAGE_TYPES = ['image/png', 'image/jpeg', 'image/jpg', 'image/gif', 'image/webp', 'image/avif'];
const VIDEO_TYPES = ['video/mp4', 'video/webm', 'video/quicktime'];
function isImageType(contentType?: string): boolean {
return contentType ? IMAGE_TYPES.includes(contentType) : false;
return contentType?.startsWith('image/') ?? false;
}
function isVideoType(contentType?: string): boolean {
return contentType ? VIDEO_TYPES.includes(contentType) : false;
return contentType?.startsWith('video/') ?? false;
}
const hasRenderableDimensions = (attachment: MessageAttachment): boolean =>