Commit 9cb89602 authored by feld's avatar feld
Browse files

Switch OGP default type from "website" to "article"

This is what Mastodon uses and might fix some link preview bugs I've encountered
parent d70db630
Pipeline #36503 passed with stages
in 6 minutes and 27 seconds
......@@ -32,7 +32,7 @@ def build_tags(%{
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 @@ def build_tags(%{user: user}) 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], []}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment