Merge branch 'fix-dm-index' into 'develop'
[akkoma] / lib / pleroma / config / deprecation_warnings.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Config.DeprecationWarnings do
6 require Logger
7
8 def check_frontend_config_mechanism() do
9 if Pleroma.Config.get(:fe) do
10 Logger.warn("""
11 !!!DEPRECATION WARNING!!!
12 You are using the old configuration mechanism for the frontend. Please check config.md.
13 """)
14 end
15 end
16
17 def check_hellthread_threshold do
18 if Pleroma.Config.get([:mrf_hellthread, :threshold]) do
19 Logger.warn("""
20 !!!DEPRECATION WARNING!!!
21 You are using the old configuration mechanism for the hellthread filter. Please check config.md.
22 """)
23 end
24 end
25
26 def warn do
27 check_frontend_config_mechanism()
28 check_hellthread_threshold()
29 end
30 end