From 750fb25f48d1d90157100acee5d2ee019d0bd9be Mon Sep 17 00:00:00 2001 From: feld Date: Tue, 7 May 2024 23:20:38 +0000 Subject: [PATCH] Revert "Merge branch 'pleroma-card-image-description' into 'develop'" This reverts merge request !4101 --- changelog.d/card-image-description.add | 1 - lib/pleroma/web/api_spec/schemas/status.ex | 4 ---- lib/pleroma/web/mastodon_api/views/status_view.ex | 1 - .../web/mastodon_api/controllers/status_controller_test.exs | 2 -- test/pleroma/web/mastodon_api/views/status_view_test.exs | 3 +-- 5 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 changelog.d/card-image-description.add diff --git a/changelog.d/card-image-description.add b/changelog.d/card-image-description.add deleted file mode 100644 index bf423ebb8..000000000 --- a/changelog.d/card-image-description.add +++ /dev/null @@ -1 +0,0 @@ -Include image description in status media cards \ No newline at end of file diff --git a/lib/pleroma/web/api_spec/schemas/status.ex b/lib/pleroma/web/api_spec/schemas/status.ex index 6e537b5da..a4052803b 100644 --- a/lib/pleroma/web/api_spec/schemas/status.ex +++ b/lib/pleroma/web/api_spec/schemas/status.ex @@ -58,10 +58,6 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do format: :uri, 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"}, description: %Schema{type: :string, description: "Description of preview"} } diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index 5a24d73c7..e464f60dc 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -589,7 +589,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do provider_url: page_url_data.scheme <> "://" <> page_url_data.host, url: page_url, image: image_url, - image_description: rich_media["image:alt"] || "", title: rich_media["title"] || "", description: rich_media["description"] || "", pleroma: %{ diff --git a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs index b8eb2d598..3d8a0fa99 100644 --- a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs @@ -1717,7 +1717,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do card_data = %{ "image" => "http://ia.media-imdb.com/images/rock.jpg", - "image_description" => "", "provider_name" => "example.com", "provider_url" => "https://example.com", "title" => "The Rock", @@ -1771,7 +1770,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do "title" => "Pleroma", "description" => "", "image" => nil, - "image_description" => "", "provider_name" => "example.com", "provider_url" => "https://example.com", "url" => "https://example.com/ogp-missing-data", diff --git a/test/pleroma/web/mastodon_api/views/status_view_test.exs b/test/pleroma/web/mastodon_api/views/status_view_test.exs index 163aa19ec..f007bb317 100644 --- a/test/pleroma/web/mastodon_api/views/status_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/status_view_test.exs @@ -773,7 +773,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do page_url = "http://example.com" card = %{ - "image:alt" => "Example image description", url: page_url, site_name: "Example site name", title: "Example website", @@ -781,7 +780,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do 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}) end