1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 02:12:40 +01:00

Embeds: handle og:sitename

This commit is contained in:
Madeline 2023-09-16 23:47:32 +10:00
parent e355be8ea3
commit c802bb9747
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -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,
};
},