Include image description in status media cards
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
987f44d811
commit
6f6bede900
5 changed files with 10 additions and 1 deletions
|
|
@ -1717,6 +1717,7 @@ 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",
|
||||
|
|
@ -1770,6 +1771,7 @@ 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",
|
||||
|
|
|
|||
|
|
@ -773,6 +773,7 @@ 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",
|
||||
|
|
@ -780,7 +781,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
description: "Example description"
|
||||
}
|
||||
|
||||
%{provider_name: "example.com"} =
|
||||
%{provider_name: "example.com", image_description: "Example image description"} =
|
||||
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue