# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Application do
set_postgres_server_version()
- # Requires Config.TransferTask so ConfigDB values are loaded
- steal_emoji_policy_setup()
-
result
end
[Pleroma.Web.RichMedia.Helpers, Pleroma.Web.MediaProxy]
|> Enum.each(&ConcurrentLimiter.new(&1, 1, 0))
end
-
- @spec steal_emoji_policy_setup() :: :ok
- def steal_emoji_policy_setup() do
- with true <-
- Pleroma.Web.ActivityPub.MRF.StealEmojiPolicy in Config.get!([:mrf, :policies]) do
- path =
- [:instance, :static_dir]
- |> Config.get!()
- |> Path.join("emoji/steal")
-
- if !File.exists?(path), do: File.mkdir_p!(path)
- else
- _ ->
- :ok
- end
- end
end