projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Apply suggestion to lib/pleroma/web/activity_pub/activity_pub_controller.ex
[akkoma]
/
lib
/
pleroma
/
emoji.ex
diff --git
a/lib/pleroma/emoji.ex
b/lib/pleroma/emoji.ex
index 854d46b1ad239fcd701d33913c537542d8052bce..66e20f0e411e6c54e8a1634d1c6bb706e18cbeb6 100644
(file)
--- a/
lib/pleroma/emoji.ex
+++ b/
lib/pleroma/emoji.ex
@@
-24,7
+24,7
@@
defmodule Pleroma.Emoji do
@ets_options [:ordered_set, :protected, :named_table, {:read_concurrency, true}]
@doc false
@ets_options [:ordered_set, :protected, :named_table, {:read_concurrency, true}]
@doc false
- def start_link do
+ def start_link
(_)
do
GenServer.start_link(__MODULE__, [], name: __MODULE__)
end
GenServer.start_link(__MODULE__, [], name: __MODULE__)
end
@@
-148,11
+148,13
@@
defmodule Pleroma.Emoji do
if File.exists?(emoji_txt) do
load_from_file(emoji_txt, emoji_groups)
else
if File.exists?(emoji_txt) do
load_from_file(emoji_txt, emoji_groups)
else
+ extensions = Pleroma.Config.get([:emoji, :pack_extensions])
+
Logger.info(
Logger.info(
- "No emoji.txt found for pack \"#{pack_name}\", assuming all
.png
files are emoji"
+ "No emoji.txt found for pack \"#{pack_name}\", assuming all
#{Enum.join(extensions, ", ")}
files are emoji"
)
)
- make_shortcode_to_file_map(pack_dir,
[".png"]
)
+ make_shortcode_to_file_map(pack_dir,
extensions
)
|> Enum.map(fn {shortcode, rel_file} ->
filename = Path.join("/emoji/#{pack_name}", rel_file)
|> Enum.map(fn {shortcode, rel_file} ->
filename = Path.join("/emoji/#{pack_name}", rel_file)