Merge branch 'revert-50af909c' into 'develop'
Revert "Merge branch 'pleroma-card-image-description' into 'develop'" See merge request pleroma/pleroma!4107
This commit is contained in:
commit
b42963a52c
|
@ -1 +0,0 @@
|
||||||
Include image description in status media cards
|
|
|
@ -58,10 +58,6 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
|
||||||
format: :uri,
|
format: :uri,
|
||||||
description: "Preview thumbnail"
|
description: "Preview thumbnail"
|
||||||
},
|
},
|
||||||
image_description: %Schema{
|
|
||||||
type: :string,
|
|
||||||
description: "Alternate text that describes what is in the thumbnail"
|
|
||||||
},
|
|
||||||
title: %Schema{type: :string, description: "Title of linked resource"},
|
title: %Schema{type: :string, description: "Title of linked resource"},
|
||||||
description: %Schema{type: :string, description: "Description of preview"}
|
description: %Schema{type: :string, description: "Description of preview"}
|
||||||
}
|
}
|
||||||
|
|
|
@ -589,7 +589,6 @@ def render("card.json", %{rich_media: rich_media, page_url: page_url}) do
|
||||||
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,
|
image: image_url,
|
||||||
image_description: rich_media["image:alt"] || "",
|
|
||||||
title: rich_media["title"] || "",
|
title: rich_media["title"] || "",
|
||||||
description: rich_media["description"] || "",
|
description: rich_media["description"] || "",
|
||||||
pleroma: %{
|
pleroma: %{
|
||||||
|
|
|
@ -1717,7 +1717,6 @@ test "returns rich-media card", %{conn: conn, user: user} do
|
||||||
|
|
||||||
card_data = %{
|
card_data = %{
|
||||||
"image" => "http://ia.media-imdb.com/images/rock.jpg",
|
"image" => "http://ia.media-imdb.com/images/rock.jpg",
|
||||||
"image_description" => "",
|
|
||||||
"provider_name" => "example.com",
|
"provider_name" => "example.com",
|
||||||
"provider_url" => "https://example.com",
|
"provider_url" => "https://example.com",
|
||||||
"title" => "The Rock",
|
"title" => "The Rock",
|
||||||
|
@ -1771,7 +1770,6 @@ test "replaces missing description with an empty string", %{conn: conn, user: us
|
||||||
"title" => "Pleroma",
|
"title" => "Pleroma",
|
||||||
"description" => "",
|
"description" => "",
|
||||||
"image" => nil,
|
"image" => nil,
|
||||||
"image_description" => "",
|
|
||||||
"provider_name" => "example.com",
|
"provider_name" => "example.com",
|
||||||
"provider_url" => "https://example.com",
|
"provider_url" => "https://example.com",
|
||||||
"url" => "https://example.com/ogp-missing-data",
|
"url" => "https://example.com/ogp-missing-data",
|
||||||
|
|
|
@ -773,7 +773,6 @@ test "a rich media card with all relevant data renders correctly" do
|
||||||
page_url = "http://example.com"
|
page_url = "http://example.com"
|
||||||
|
|
||||||
card = %{
|
card = %{
|
||||||
"image:alt" => "Example image description",
|
|
||||||
url: page_url,
|
url: page_url,
|
||||||
site_name: "Example site name",
|
site_name: "Example site name",
|
||||||
title: "Example website",
|
title: "Example website",
|
||||||
|
@ -781,7 +780,7 @@ test "a rich media card with all relevant data renders correctly" do
|
||||||
description: "Example description"
|
description: "Example description"
|
||||||
}
|
}
|
||||||
|
|
||||||
%{provider_name: "example.com", image_description: "Example image description"} =
|
%{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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue