mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Link previews: show full size image less often
This commit is contained in:
committed by
Scott Nonnenberg
parent
92a35649da
commit
8c25ffd6f5
@@ -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(
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { AttachmentType } from '../Attachment';
|
||||
|
||||
export interface LinkPreviewType {
|
||||
title: string;
|
||||
description?: string;
|
||||
domain: string;
|
||||
url: string;
|
||||
isStickerPack: boolean;
|
||||
image?: AttachmentType;
|
||||
date?: number;
|
||||
}
|
||||
Reference in New Issue
Block a user