Commit 0b5a2bbe authored by lain's avatar lain

Merge branch 'bugfix/link-preview-site_name' into 'develop'

MastodonAPI.StatusView: Do not use site_name

See merge request pleroma/pleroma!2216
parents 631eed87 12573312
......@@ -321,11 +321,9 @@ def render("card.json", %{rich_media: rich_media, page_url: page_url}) do
nil
end
site_name = rich_media[:site_name] || page_url_data.host
%{
type: "link",
provider_name: site_name,
provider_name: page_url_data.host,
provider_url: page_url_data.scheme <> "://" <> page_url_data.host,
url: page_url,
image: image_url |> MediaProxy.url(),
......
......@@ -491,7 +491,7 @@ test "a rich media card without an image renders correctly" do
title: "Example website"
}
%{provider_name: "Example site name"} =
%{provider_name: "example.com"} =
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
end
......@@ -506,7 +506,7 @@ test "a rich media card with all relevant data renders correctly" do
description: "Example description"
}
%{provider_name: "Example site name"} =
%{provider_name: "example.com"} =
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
end
end
......
Markdown is supported
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