diff options
author | rinpatch <rinpatch@sdf.org> | 2020-05-27 19:35:35 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-05-27 19:44:02 +0300 |
commit | 8f6d428880721d4b0151991e7943706b70ab8005 (patch) | |
tree | 9a66ba38bec096340c8ec77ce84d7af7f6352247 /lib | |
parent | 78c46fb7ba2aa9e9842d3c7d8331488fd10a3b9d (diff) | |
download | pleroma-8f6d428880721d4b0151991e7943706b70ab8005.tar.gz |
AccountView: Use mediaproxy URLs for emojis
Also use atom keys in emoji maps instead of binaries
Closes #1810
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/account_view.ex | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex index 45fffaad2..04c419d2f 100644 --- a/lib/pleroma/web/mastodon_api/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/account_view.ex @@ -182,12 +182,14 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do bot = user.actor_type in ["Application", "Service"] emojis = - Enum.map(user.emoji, fn {shortcode, url} -> + Enum.map(user.emoji, fn {shortcode, raw_url} -> + url = MediaProxy.url(raw_url) + %{ - "shortcode" => shortcode, - "url" => url, - "static_url" => url, - "visible_in_picker" => false + shortcode: shortcode, + url: url, + static_url: url, + visible_in_picker: false } end) |