aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/twitter_api/controllers/util_controller.ex
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2019-09-26 19:01:54 +0300
committerMaxim Filippov <colixer@gmail.com>2019-09-26 19:01:54 +0300
commite7836adf21421de7a6d1d84fd605ec7d7f207cda (patch)
treeca378665486e37ec82a19feb95c84d2131b83e7a /lib/pleroma/web/twitter_api/controllers/util_controller.ex
parentdf15ed13d15db5b5a371345fcb9968b5af4100af (diff)
parent6abe12dceda8d0d32878208987a9631d5d546a3d (diff)
downloadpleroma-e7836adf21421de7a6d1d84fd605ec7d7f207cda.tar.gz
Merge branch 'develop' into feature/moderation-log-filters
Diffstat (limited to 'lib/pleroma/web/twitter_api/controllers/util_controller.ex')
-rw-r--r--lib/pleroma/web/twitter_api/controllers/util_controller.ex6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex
index d7745ae7a..f05a84c7f 100644
--- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex
+++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex
@@ -239,11 +239,9 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
def emoji(conn, _params) do
emoji =
- Emoji.get_all()
- |> Enum.map(fn {short_code, path, tags} ->
- {short_code, %{image_url: path, tags: tags}}
+ Enum.reduce(Emoji.get_all(), %{}, fn {code, %Emoji{file: file, tags: tags}}, acc ->
+ Map.put(acc, code, %{image_url: file, tags: tags})
end)
- |> Enum.into(%{})
json(conn, emoji)
end