Commit fc3bcf33 authored by lain's avatar lain
Browse files

Fix following locked users.

parent d5af41b5
...@@ -191,7 +191,7 @@ def needs_update?(%User{local: false} = user) do ...@@ -191,7 +191,7 @@ def needs_update?(%User{local: false} = user) do
def needs_update?(_), do: true 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} {:ok, follower}
end end
......
...@@ -56,8 +56,8 @@ test "can't follow a user who blocked us" do ...@@ -56,8 +56,8 @@ test "can't follow a user who blocked us" do
end end
test "local users do not automatically follow local locked accounts" do test "local users do not automatically follow local locked accounts" do
follower = insert(:user, info: %{"locked" => true}) follower = insert(:user, info: %{locked: true})
followed = insert(:user, info: %{"locked" => true}) followed = insert(:user, info: %{locked: true})
{:ok, follower} = User.maybe_direct_follow(follower, followed) {:ok, follower} = User.maybe_direct_follow(follower, followed)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment