aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorgan Bazalgette <the@howl.moe>2018-04-02 12:04:11 +0200
committerMorgan Bazalgette <the@howl.moe>2018-04-02 12:04:11 +0200
commit5e4bb4ad925d1f9b194f07a27e3ecc21e821a051 (patch)
tree10ff082406a84ff21fe44b8b8512869b2d0d356c
parent7130e9ddb16286efd7d01088e816f05e82cfa2a1 (diff)
downloadpleroma-5e4bb4ad925d1f9b194f07a27e3ecc21e821a051.tar.gz
masto api: run emojis through mediaproxy
fixes #107
-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)