projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4d18f3
)
Use with instead of if in the card
author
rinpatch
<rinpatch@sdf.org>
Sat, 2 Feb 2019 09:04:18 +0000
(12:04 +0300)
committer
rinpatch
<rinpatch@sdf.org>
Sat, 2 Feb 2019 09:04:18 +0000
(12:04 +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 aa38784a69ffaa835333699a0d82a1f6df16ea67..c8fde93bae6a66b078036a2bcacbb7b0a8407a26 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/
lib/pleroma/web/mastodon_api/views/status_view.ex
@@
-186,11
+186,12
@@
defmodule Pleroma.Web.MastodonAPI.StatusView do
page_url_data = URI.parse(page_url)
image_url =
-
if %URI{host: nil} =
page_url_data do
+
with %URI{host: nil} <-
page_url_data do
rich_media[:image]
else
- URI.merge(page_url_data, URI.parse(rich_media[:image]))
- |> to_string
+ _ ->
+ URI.merge(page_url_data, URI.parse(rich_media[:image]))
+ |> to_string
end
site_name = rich_media[:site_name] || page_url_data.host