aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma
diff options
context:
space:
mode:
authorIlja <domainepublic@spectraltheorem.be>2020-10-05 11:26:08 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2021-08-06 07:59:53 +0200
commitc0489f9fac78701345c2902fa59bd99381bc27ab (patch)
tree2d80f1780fae08e02503a98e18ed244123da76c1 /lib/pleroma
parent64002e92adcf08564d9b8e3fa2dcf7c07c72145a (diff)
downloadpleroma-c0489f9fac78701345c2902fa59bd99381bc27ab.tar.gz
Fixed deprecation warning checks
When a setting was deprecated, the code would stop checking for the rest of the possible deprications. This also meant that the settings weren't rewritten to the new settings for deprecated settings besides the first one.
Diffstat (limited to 'lib/pleroma')
-rw-r--r--lib/pleroma/config/deprecation_warnings.ex35
1 files changed, 18 insertions, 17 deletions
diff --git a/lib/pleroma/config/deprecation_warnings.ex b/lib/pleroma/config/deprecation_warnings.ex
index cc22b5d47..887470de9 100644
--- a/lib/pleroma/config/deprecation_warnings.ex
+++ b/lib/pleroma/config/deprecation_warnings.ex
@@ -170,23 +170,24 @@ defmodule Pleroma.Config.DeprecationWarnings do
end
def warn do
- with :ok <- check_hellthread_threshold(),
- :ok <- check_old_mrf_config(),
- :ok <- check_media_proxy_whitelist_config(),
- :ok <- check_welcome_message_config(),
- :ok <- check_gun_pool_options(),
- :ok <- check_activity_expiration_config(),
- :ok <- check_remote_ip_plug_name(),
- :ok <- check_uploders_s3_public_endpoint(),
- :ok <- check_old_chat_shoutbox(),
- :ok <- check_quarantined_instances_tuples(),
- :ok <- check_transparency_exclusions_tuples(),
- :ok <- check_simple_policy_tuples() do
- :ok
- else
- _ ->
- :error
- end
+ [
+ check_hellthread_threshold(),
+ check_old_mrf_config(),
+ check_media_proxy_whitelist_config(),
+ check_welcome_message_config(),
+ check_gun_pool_options(),
+ check_activity_expiration_config(),
+ check_remote_ip_plug_name(),
+ check_uploders_s3_public_endpoint(),
+ check_old_chat_shoutbox(),
+ check_quarantined_instances_tuples(),
+ check_transparency_exclusions_tuples(),
+ check_simple_policy_tuples()
+ ]
+ |> Enum.reduce(:ok, fn
+ :ok, :ok -> :ok
+ _, _ -> :error
+ end)
end
def check_welcome_message_config do