deprecation_warnings.ex 848 Bytes
Newer Older
lain's avatar
lain committed
1
2
3
4
# Pleroma: A lightweight social networking server
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only

5
defmodule Pleroma.Config.DeprecationWarnings do
lain's avatar
lain committed
6
7
  require Logger

8
  def check_frontend_config_mechanism do
lain's avatar
lain committed
9
10
11
12
13
14
    if Pleroma.Config.get(:fe) do
      Logger.warn("""
      !!!DEPRECATION WARNING!!!
      You are using the old configuration mechanism for the frontend. Please check config.md.
      """)
    end
15
  end
Karen Konou's avatar
Karen Konou committed
16

17
18
  def check_hellthread_threshold do
    if Pleroma.Config.get([:mrf_hellthread, :threshold]) do
Karen Konou's avatar
Karen Konou committed
19
20
21
22
23
      Logger.warn("""
      !!!DEPRECATION WARNING!!!
      You are using the old configuration mechanism for the hellthread filter. Please check config.md.
      """)
    end
lain's avatar
lain committed
24
25
26
27
  end

  def warn do
    check_frontend_config_mechanism()
28
    check_hellthread_threshold()
lain's avatar
lain committed
29
30
  end
end