aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2018-04-02 11:24:12 +0000
committerlambda <pleromagit@rogerbraun.net>2018-04-02 11:24:12 +0000
commit807d243c64e6cc481f465e4b54fada0f2f66cb9f (patch)
tree4d6ce9c817fb1c2bef16a0ba70927b9c6b2260ee /lib
parentcd543d58a1b8ddf0f41a39800dc7a18321cd3250 (diff)
parent5e4bb4ad925d1f9b194f07a27e3ecc21e821a051 (diff)
downloadpleroma-807d243c64e6cc481f465e4b54fada0f2f66cb9f.tar.gz
Merge branch 'fix-107' into 'develop'
masto api: run emojis through mediaproxy Closes #107 See merge request pleroma/pleroma!92
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/views/status_view.ex6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
index bc5ae5da7..df360644a 100644
--- 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)