Support url-only link previews in stories
This commit is contained in:
@@ -15,7 +15,7 @@ export type LinkPreviewImage = AttachmentType & {
|
||||
};
|
||||
|
||||
export type LinkPreviewResult = {
|
||||
title: string;
|
||||
title: string | null;
|
||||
url: string;
|
||||
image?: LinkPreviewImage;
|
||||
description: string | null;
|
||||
@@ -32,6 +32,15 @@ export enum LinkPreviewSourceType {
|
||||
StoryCreator,
|
||||
}
|
||||
|
||||
export type MaybeGrabLinkPreviewOptionsType = Readonly<{
|
||||
caretLocation?: number;
|
||||
mode?: 'conversation' | 'story';
|
||||
}>;
|
||||
|
||||
export type AddLinkPreviewOptionsType = Readonly<{
|
||||
disableFetch?: boolean;
|
||||
}>;
|
||||
|
||||
const linkify = LinkifyIt();
|
||||
|
||||
export function shouldPreviewHref(href: string): boolean {
|
||||
|
Reference in New Issue
Block a user