From c802bb9747bedcfd1ca4e2483e9fe53d6678d4fd Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 16 Sep 2023 23:47:32 +1000 Subject: Embeds: handle og:sitename --- src/api/util/utility/EmbedHandlers.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/api/util/utility/EmbedHandlers.ts b/src/api/util/utility/EmbedHandlers.ts index f39db9c3..0f1e88a5 100644 --- a/src/api/util/utility/EmbedHandlers.ts +++ b/src/api/util/utility/EmbedHandlers.ts @@ -121,6 +121,7 @@ export const getMetaDescriptions = (text: string) => { height: tryParseInt(getMeta($, "og:image:height")), url: getMeta($, "og:url"), youtube_embed: getMeta($, "og:video:secure_url"), + site_name: getMeta($, "og:site_name"), $, }; @@ -216,6 +217,12 @@ export const EmbedHandlers: { title: metas.title, thumbnail: makeEmbedImage(metas.image, metas.width, metas.height), description: metas.description, + provider: metas.site_name + ? { + name: metas.site_name, + url: url.origin, + } + : undefined, }; }, -- cgit 1.4.1