diff --git a/server/presenters/unfurls/unfurl.ts b/server/presenters/unfurls/unfurl.ts index 8e8c3f3f7..6d8e6d654 100644 --- a/server/presenters/unfurls/unfurl.ts +++ b/server/presenters/unfurls/unfurl.ts @@ -1,19 +1,14 @@ -import { IframelyErrorResponse, Unfurl } from "@shared/types"; +import { Unfurl } from "@shared/types"; -function presentUnfurl(data: any): Unfurl | IframelyErrorResponse { - return !data.error - ? { - url: data.url, - type: data.type, - title: data.title, - description: data.description, - thumbnailUrl: data.thumbnail_url, - meta: data.meta, - } - : { - status: data.status, - error: data.error, - }; +function presentUnfurl(data: any): Unfurl { + return { + url: data.url, + type: data.type, + title: data.title, + description: data.description, + thumbnailUrl: data.thumbnail_url, + meta: data.meta, + }; } export default presentUnfurl; diff --git a/shared/types.ts b/shared/types.ts index 3968277e7..a01325862 100644 --- a/shared/types.ts +++ b/shared/types.ts @@ -225,10 +225,5 @@ export type Unfurl = { meta?: Record; }; -export type IframelyErrorResponse = { - status: number; - error: string; -}; - // eslint-disable-next-line @typescript-eslint/no-explicit-any export type ProsemirrorData = Record;