summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-12-02 16:54:08 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-12-02 16:54:08 +0000
commit763fd696ef100ae46d980f6656b90ef9905461c8 (patch)
treeb76eb6df75389f3af0332fbc6163007d0db6cd0a
parent7fef71c387566a712d2c3f61036295a9063bf852 (diff)
Apply 1 suggestion(s) to 1 file(s)
-rw-r--r--lib/pleroma/emoji.ex9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/pleroma/emoji.ex b/lib/pleroma/emoji.ex
index a9767c1ea..9f2e98f08 100644
--- a/lib/pleroma/emoji.ex
+++ b/lib/pleroma/emoji.ex
@@ -106,12 +106,9 @@ defmodule Pleroma.Emoji do
@emoji_reactions File.read!(@external_resource)
|> Jason.decode!()
- |> Enum.reduce(%{}, fn {name, codepoint}, acc ->
- Map.put(
- acc,
- String.downcase(name),
- [codepoint |> String.to_integer(16)] |> String.Chars.to_string()
- )
+ |> Map.new(fn {name, codepoint} ->
+ {String.downcase(name),
+ [codepoint |> String.to_integer(16)] |> String.Chars.to_string()}
end)
# Consider putting the emoji as the key if that's fine with PleromaFE