Commit 1d94b67e authored by kaniini's avatar kaniini

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

parent 03991e7b
Pipeline #7100 failed with stages
in 6 minutes and 7 seconds
......@@ -192,8 +192,12 @@ def render("card.json", %{rich_media: rich_media, page_url: page_url}) do
page_url = page_url_data |> to_string
image_url =
if rich_media[:image] != nil do
URI.merge(page_url_data, URI.parse(rich_media[:image]))
|> to_string
site_name = rich_media[:site_name] ||
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment