v2 Suggestions: don't skip visibility check
This commit is contained in:
parent
b17360cd7c
commit
e28d990ecb
|
@ -43,7 +43,7 @@ def index(conn, params),
|
|||
do: Pleroma.Web.MastodonAPI.MastodonAPIController.empty_array(conn, params)
|
||||
|
||||
@doc "GET /api/v2/suggestions"
|
||||
def index2(conn, params) do
|
||||
def index2(%{assigns: %{user: user}} = conn, params) do
|
||||
limit = Map.get(params, :limit, 40) |> min(80)
|
||||
|
||||
users =
|
||||
|
@ -51,6 +51,6 @@ def index2(conn, params) do
|
|||
|> User.Query.build()
|
||||
|> Pleroma.Repo.all()
|
||||
|
||||
render(conn, "index.json", %{users: users, source: :staff, skip_visibility_check: true})
|
||||
render(conn, "index.json", %{users: users, source: :staff, for: user})
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue