mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-04 16:09:36 +00:00
Fix following locked users.
This commit is contained in:
parent
d5af41b577
commit
fc3bcf335e
2 changed files with 3 additions and 3 deletions
|
@ -191,7 +191,7 @@ defmodule Pleroma.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 @@ defmodule Pleroma.UserTest 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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue