From: lain Date: Sun, 18 Nov 2018 17:53:50 +0000 (+0100) Subject: Fix following locked users. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=fc3bcf335e2c5ba1f8b1b25c1a4869cefff2a431;p=akkoma Fix following locked users. --- diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index b3d0712d4..af2a696a9 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -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 diff --git a/test/user_test.exs b/test/user_test.exs index 3d330b963..f37f4521d 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -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)