aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/twitter_api
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2019-08-31 10:14:53 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2019-08-31 10:14:53 +0300
commit6ef0103ca0b194971a2e6f61685316536b742a11 (patch)
treedbc3ef3e169d12e6529499366f793d21bc2a2c9c /lib/pleroma/web/twitter_api
parentd8098d142a0e8412eabdf5fe63705c25bcb1be34 (diff)
downloadpleroma-6ef0103ca0b194971a2e6f61685316536b742a11.tar.gz
added Emoji struct
Diffstat (limited to 'lib/pleroma/web/twitter_api')
-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 923480242..c14792068 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