mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
emoji/loader.ex: be more verbose about which emoji pack config is loading now
To avoid issue when one of the hundred JSON files is malformed and administrator don't know which one
This commit is contained in:
parent
6eb7d69e60
commit
31b9034a27
1 changed files with 2 additions and 0 deletions
|
@ -103,6 +103,7 @@ defmodule Pleroma.Emoji.Loader do
|
|||
pack_file = Path.join(pack_dir, "pack.json")
|
||||
|
||||
if File.exists?(pack_file) do
|
||||
Logger.info("Loading emoji pack from JSON: #{pack_file}")
|
||||
contents = Jason.decode!(File.read!(pack_file))
|
||||
|
||||
contents["files"]
|
||||
|
@ -115,6 +116,7 @@ defmodule Pleroma.Emoji.Loader do
|
|||
emoji_txt = Path.join(pack_dir, "emoji.txt")
|
||||
|
||||
if File.exists?(emoji_txt) do
|
||||
Logger.info("Loading emoji pack from emoji.txt: #{emoji_txt}")
|
||||
load_from_file(emoji_txt, emoji_groups)
|
||||
else
|
||||
extensions = Config.get([:emoji, :pack_extensions])
|
||||
|
|
Loading…
Reference in a new issue