Fix following locked users.
authorlain <lain@soykaf.club>
Sun, 18 Nov 2018 17:53:50 +0000 (18:53 +0100)
committerlain <lain@soykaf.club>
Sun, 18 Nov 2018 17:53:50 +0000 (18:53 +0100)
lib/pleroma/user.ex
test/user_test.exs

index b3d0712d417cbc2ae66bedb0a54326d661cb3ea6..af2a696a98ab7019ef520f903c7dfa16ac15af73 100644 (file)
@@ -191,7 +191,7 @@ defmodule Pleroma.User do
 
   def needs_update?(_), do: true
 
-  def maybe_direct_follow(%User{} = follower, %User{local: true, info: %{"locked" => true}}) do
+  def maybe_direct_follow(%User{} = follower, %User{local: true, info: %{locked: true}}) do
     {:ok, follower}
   end
 
index 3d330b9632278909fa787b8ccc3f1b04d29479a4..f37f4521d4de48c82882209c6df13381731f8706 100644 (file)
@@ -56,8 +56,8 @@ defmodule Pleroma.UserTest do
   end
 
   test "local users do not automatically follow local locked accounts" do
-    follower = insert(:user, info: %{"locked" => true})
-    followed = insert(:user, info: %{"locked" => true})
+    follower = insert(:user, info: %{locked: true})
+    followed = insert(:user, info: %{locked: true})
 
     {:ok, follower} = User.maybe_direct_follow(follower, followed)