AccountController.lookup: skip visibility check
authormarcin mikołajczak <git@mkljczk.pl>
Tue, 28 Dec 2021 17:24:48 +0000 (18:24 +0100)
committermarcin mikołajczak <git@mkljczk.pl>
Tue, 28 Dec 2021 17:24:48 +0000 (18:24 +0100)
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
lib/pleroma/web/mastodon_api/controllers/account_controller.ex

index 399a34217e7a1c37278cd0bc6d18e7bd217d3287..6d8fcd0263961e1724063ff88c71ac4f3887f327 100644 (file)
@@ -493,11 +493,11 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
   end
 
   @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
       render(conn, "show.json",
         user: user,
-        for: for_user
+        skip_visibility_check: true
       )
     else
       error -> user_visibility_error(conn, error)