Skip to content
Snippets Groups Projects
Commit 1d94b67e authored by kaniini's avatar kaniini
Browse files

mastodon api: fix rendering of cards without image URLs (closes #597)

parent 03991e7b
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment