Fix following locked users.

This commit is contained in:
lain 2018-11-18 18:53:50 +01:00
parent d5af41b577
commit fc3bcf335e
2 changed files with 3 additions and 3 deletions

View file

@ -191,7 +191,7 @@ def needs_update?(%User{local: false} = 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

View file

@ -56,8 +56,8 @@ test "can't follow a user who blocked us" 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)