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
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)