projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbadf9d
)
merge only if page_url is an absolute path
author
rinpatch
<rinpatch@sdf.org>
Sat, 2 Feb 2019 08:53:46 +0000
(11:53 +0300)
committer
rinpatch
<rinpatch@sdf.org>
Sat, 2 Feb 2019 08:53:46 +0000
(11:53 +0300)
lib/pleroma/web/mastodon_api/views/status_view.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/mastodon_api/views/status_view.ex
b/lib/pleroma/web/mastodon_api/views/status_view.ex
index 826563f7497813a27f8ba2211e45766db8b45d60..aa38784a69ffaa835333699a0d82a1f6df16ea67 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/
lib/pleroma/web/mastodon_api/views/status_view.ex
@@
-186,8
+186,12
@@
defmodule Pleroma.Web.MastodonAPI.StatusView do
page_url_data = URI.parse(page_url)
image_url =
- URI.merge(page_url_data, URI.parse(rich_media[:image]))
- |> to_string
+ if %URI{host: nil} = page_url_data do
+ rich_media[:image]
+ else
+ URI.merge(page_url_data, URI.parse(rich_media[:image]))
+ |> to_string
+ end
site_name = rich_media[:site_name] || page_url_data.host