mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-11-15 21:46:23 +01:00
mastodon api: fix rendering of cards without image URLs (closes #597)
This commit is contained in:
parent
03991e7bc5
commit
1d94b67e40
@ -192,8 +192,12 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
||||
page_url = page_url_data |> to_string
|
||||
|
||||
image_url =
|
||||
URI.merge(page_url_data, URI.parse(rich_media[:image]))
|
||||
|> to_string
|
||||
if rich_media[:image] != nil do
|
||||
URI.merge(page_url_data, URI.parse(rich_media[:image]))
|
||||
|> to_string
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
||||
site_name = rich_media[:site_name] || page_url_data.host
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user