Prefer opengraph image, fall back to Standard Site coverImage (#10694)
(cherry picked from commit b87a51b485)
This commit is contained in:
@@ -246,6 +246,10 @@ async function resolveExternal(
|
|||||||
title: result.title ?? '',
|
title: result.title ?? '',
|
||||||
description: result.description ?? '',
|
description: result.description ?? '',
|
||||||
thumb: result.image ? await imageToThumb(result.image) : undefined,
|
thumb: result.image ? await imageToThumb(result.image) : undefined,
|
||||||
|
/*
|
||||||
|
* New fields from Standard Site integration. Other fields are derived from
|
||||||
|
* opengraph/oembed as before.
|
||||||
|
*/
|
||||||
associatedRefs: result.associatedRefs,
|
associatedRefs: result.associatedRefs,
|
||||||
view: result.view,
|
view: result.view,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,8 @@ export const ExternalEmbedLink = ({
|
|||||||
uri,
|
uri,
|
||||||
description:
|
description:
|
||||||
data.view?.external?.description || data.description,
|
data.view?.external?.description || data.description,
|
||||||
thumb: data.view?.external?.thumb || data.thumb?.source.path,
|
// prefer opengraph data to atproto record-derived image
|
||||||
|
thumb: data.thumb?.source.path || data.view?.external?.thumb,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user