diff options
author | lain <lain@soykaf.club> | 2024-04-19 07:39:05 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2024-04-19 07:39:05 +0000 |
commit | 50af909c0104a7d446adfd96821266f0394a5b93 (patch) | |
tree | 6c04ba961b2d19018cb2c868f388fa37f70c6097 /lib | |
parent | 87b8ac3ce6bbbeb0ab65ca41e47f09f2d66f2f25 (diff) | |
parent | 6f6bede9003fc99b24356f06aebfc5dabe54c46c (diff) | |
download | pleroma-50af909c0104a7d446adfd96821266f0394a5b93.tar.gz pleroma-50af909c0104a7d446adfd96821266f0394a5b93.zip |
Merge branch 'pleroma-card-image-description' into 'develop'
Include image description in status media cards
See merge request pleroma/pleroma!4101
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/api_spec/schemas/status.ex | 4 | ||||
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/status_view.ex | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/pleroma/web/api_spec/schemas/status.ex b/lib/pleroma/web/api_spec/schemas/status.ex index a4052803b..6e537b5da 100644 --- a/lib/pleroma/web/api_spec/schemas/status.ex +++ b/lib/pleroma/web/api_spec/schemas/status.ex @@ -58,6 +58,10 @@ 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 e464f60dc..5a24d73c7 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -589,6 +589,7 @@ 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: %{ |