From fc3bcf335e2c5ba1f8b1b25c1a4869cefff2a431 Mon Sep 17 00:00:00 2001 From: lain Date: Sun, 18 Nov 2018 18:53:50 +0100 Subject: [PATCH] Fix following locked users. --- lib/pleroma/user.ex | 2 +- test/user_test.exs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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) -- 2.45.2