AccountController.lookup: skip visibility check

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2021-12-28 18:24:48 +01:00
parent 746c9daa62
commit 0dd1caa841

View file

@ -493,11 +493,11 @@ def blocks(%{assigns: %{user: user}} = conn, params) do
end end
@doc "GET /api/v1/accounts/lookup" @doc "GET /api/v1/accounts/lookup"
def lookup(%{assigns: %{user: for_user}} = conn, %{acct: nickname} = _params) do def lookup(conn, %{acct: nickname} = _params) do
with %User{} = user <- User.get_by_nickname(nickname) do with %User{} = user <- User.get_by_nickname(nickname) do
render(conn, "show.json", render(conn, "show.json",
user: user, user: user,
for: for_user skip_visibility_check: true
) )
else else
error -> user_visibility_error(conn, error) error -> user_visibility_error(conn, error)