Use Pleroma.Config instead of Application.get_env
authorSadposter <hannah+pleroma@coffee-and-dreams.uk>
Mon, 8 Apr 2019 12:04:30 +0000 (13:04 +0100)
committerSadposter <hannah+pleroma@coffee-and-dreams.uk>
Mon, 8 Apr 2019 12:04:30 +0000 (13:04 +0100)
lib/pleroma/user.ex

index 9a80601c1a5fbdab37257ae3cf7635912662c3ca..15f606c5fc91443478e0fde6750a030509c066fd 100644 (file)
@@ -924,8 +924,7 @@ defmodule Pleroma.User do
   end
 
   def subscribe(subscriber, %{ap_id: ap_id}) do
-    user_config = Application.get_env(:pleroma, :user)
-    deny_follow_blocked = Keyword.get(user_config, :deny_follow_blocked)
+    deny_follow_blocked = Pleroma.Config.get([:user, :deny_follow_blocked])
 
     with %User{} = subscribed <- get_or_fetch_by_ap_id(ap_id) do
       blocked = blocks?(subscribed, subscriber) and deny_follow_blocked