aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/twitter_api/controllers/util_controller.ex
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2019-09-26 16:13:07 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2019-09-26 16:16:30 +0300
commit3d722dc2008ab7e5dde4b474bb038a1857a28d85 (patch)
tree53c05aaea7626ec1f4782dd33eee779bb38d8730 /lib/pleroma/web/twitter_api/controllers/util_controller.ex
parentd75d0ae134e0a8de9504507f4c78567b9eedcc72 (diff)
parent6abe12dceda8d0d32878208987a9631d5d546a3d (diff)
downloadpleroma-3d722dc2008ab7e5dde4b474bb038a1857a28d85.tar.gz
Merge branch 'develop' into tests/mastodon_api_controller.ex
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