AccountView: Use mediaproxy URLs for emojis

Also use atom keys in emoji maps instead of binaries

Closes #1810
This commit is contained in:
rinpatch 2020-05-27 19:35:35 +03:00
commit 8f6d428880
2 changed files with 38 additions and 9 deletions

View file

@ -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)