From 9cb8960284c7046d4a058c0526b55bce5ef9513b Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 8 Jun 2021 17:14:30 -0500 Subject: [PATCH] Switch OGP default type from "website" to "article" This is what Mastodon uses and might fix some link preview bugs I've encountered --- lib/pleroma/web/metadata/providers/open_graph.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/metadata/providers/open_graph.ex b/lib/pleroma/web/metadata/providers/open_graph.ex index 78cef1525..e5712ec63 100644 --- a/lib/pleroma/web/metadata/providers/open_graph.ex +++ b/lib/pleroma/web/metadata/providers/open_graph.ex @@ -32,7 +32,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do property: "og:description", content: scrubbed_content ], []}, - {:meta, [property: "og:type", content: "website"], []} + {:meta, [property: "og:type", content: "article"], []} ] ++ if attachments == [] or Metadata.activity_nsfw?(object) do [ @@ -57,7 +57,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do ], []}, {:meta, [property: "og:url", content: user.uri || user.ap_id], []}, {:meta, [property: "og:description", content: truncated_bio], []}, - {:meta, [property: "og:type", content: "website"], []}, + {:meta, [property: "og:type", content: "article"], []}, {:meta, [property: "og:image", content: Utils.attachment_url(User.avatar_url(user))], []}, {:meta, [property: "og:image:width", content: 150], []}, {:meta, [property: "og:image:height", content: 150], []} -- 2.45.2