Link previews: show full size image less often

This commit is contained in:
Evan Hahn
2021-01-08 13:39:32 -06:00
committed by Scott Nonnenberg
parent 92a35649da
commit 8c25ffd6f5
7 changed files with 220 additions and 53 deletions
+5 -5
View File
@@ -133,12 +133,12 @@ export function isImage(
}
export function isImageAttachment(
attachment: AttachmentType
): boolean | undefined {
return (
attachment?: AttachmentType
): attachment is AttachmentType {
return Boolean(
attachment &&
attachment.contentType &&
isImageTypeSupported(attachment.contentType)
attachment.contentType &&
isImageTypeSupported(attachment.contentType)
);
}
export function hasImage(