projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mastodon api: fix rendering of cards without image URLs (closes #597)
[akkoma]
/
lib
/
pleroma
/
web
/
mastodon_api
/
views
/
status_view.ex
diff --git
a/lib/pleroma/web/mastodon_api/views/status_view.ex
b/lib/pleroma/web/mastodon_api/views/status_view.ex
index d1b11d4f10288c9db64e6aa6e7c91df76104f994..c0e289ef8013b7ed3a1e6a1b9a84e0ed2ff627cd 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/
lib/pleroma/web/mastodon_api/views/status_view.ex
@@
-192,8
+192,12
@@
defmodule Pleroma.Web.MastodonAPI.StatusView do
page_url = page_url_data |> to_string
image_url =
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
site_name = rich_media[:site_name] || page_url_data.host