Merge branch 'bugfix/link-preview-site_name' into 'develop'
MastodonAPI.StatusView: Do not use site_name See merge request pleroma/pleroma!2216
This commit is contained in:
commit
0b5a2bbe5b
2 changed files with 3 additions and 5 deletions
|
@ -321,11 +321,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
site_name = rich_media[:site_name] || page_url_data.host
|
|
||||||
|
|
||||||
%{
|
%{
|
||||||
type: "link",
|
type: "link",
|
||||||
provider_name: site_name,
|
provider_name: page_url_data.host,
|
||||||
provider_url: page_url_data.scheme <> "://" <> page_url_data.host,
|
provider_url: page_url_data.scheme <> "://" <> page_url_data.host,
|
||||||
url: page_url,
|
url: page_url,
|
||||||
image: image_url |> MediaProxy.url(),
|
image: image_url |> MediaProxy.url(),
|
||||||
|
|
|
@ -491,7 +491,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
||||||
title: "Example website"
|
title: "Example website"
|
||||||
}
|
}
|
||||||
|
|
||||||
%{provider_name: "Example site name"} =
|
%{provider_name: "example.com"} =
|
||||||
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
|
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
||||||
description: "Example description"
|
description: "Example description"
|
||||||
}
|
}
|
||||||
|
|
||||||
%{provider_name: "Example site name"} =
|
%{provider_name: "example.com"} =
|
||||||
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
|
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue