projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7130e9d
)
masto api: run emojis through mediaproxy
author
Morgan Bazalgette
<the@howl.moe>
Mon, 2 Apr 2018 10:04:11 +0000
(12:04 +0200)
committer
Morgan Bazalgette
<the@howl.moe>
Mon, 2 Apr 2018 10:04:11 +0000
(12:04 +0200)
fixes #107
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 bc5ae5da7dd80212d827096ceacd1f5a6ff20ed2..df360644a515a3c71bcf64aa760f76335595e14a 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/
lib/pleroma/web/mastodon_api/views/status_view.ex
@@
-125,7
+125,11
@@
defmodule Pleroma.Web.MastodonAPI.StatusView do
(activity.data["object"]["emoji"] || [])
|> Enum.map(fn {name, url} ->
name = HtmlSanitizeEx.strip_tags(name)
- url = HtmlSanitizeEx.strip_tags(url)
+
+ url =
+ HtmlSanitizeEx.strip_tags(url)
+ |> MediaProxy.url()
+
%{shortcode: name, url: url, static_url: url}
end)