Reload emoji when using mix pleroma.emoji gen-pack and get-packs
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending

I think it makes more sense that the emoji cache gets reloaded in Akkoma if you add or create emoji packs.
This commit is contained in:
Norm 2023-06-04 02:43:18 +00:00
parent fb8081e1a3
commit b99053d2c2

View file

@ -130,6 +130,7 @@ defmodule Mix.Tasks.Pleroma.Emoji do
} }
File.write!(Path.join(pack_path, "pack.json"), Jason.encode!(pack_json, pretty: true)) File.write!(Path.join(pack_path, "pack.json"), Jason.encode!(pack_json, pretty: true))
Pleroma.Emoji.reload()
else else
IO.puts(IO.ANSI.format([:bright, :red, "No pack named \"#{pack_name}\" found"])) IO.puts(IO.ANSI.format([:bright, :red, "No pack named \"#{pack_name}\" found"]))
end end
@ -235,6 +236,7 @@ defmodule Mix.Tasks.Pleroma.Emoji do
IO.puts("#{pack_file} has been created with the #{name} pack") IO.puts("#{pack_file} has been created with the #{name} pack")
end end
Pleroma.Emoji.reload()
end end
def run(["reload"]) do def run(["reload"]) do