v2 Suggestions: don't skip visibility check
This commit is contained in:
parent
b17360cd7c
commit
e28d990ecb
1 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ defmodule Pleroma.Web.MastodonAPI.SuggestionController do
|
||||||
do: Pleroma.Web.MastodonAPI.MastodonAPIController.empty_array(conn, params)
|
do: Pleroma.Web.MastodonAPI.MastodonAPIController.empty_array(conn, params)
|
||||||
|
|
||||||
@doc "GET /api/v2/suggestions"
|
@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)
|
limit = Map.get(params, :limit, 40) |> min(80)
|
||||||
|
|
||||||
users =
|
users =
|
||||||
|
@ -51,6 +51,6 @@ defmodule Pleroma.Web.MastodonAPI.SuggestionController do
|
||||||
|> User.Query.build()
|
|> User.Query.build()
|
||||||
|> Pleroma.Repo.all()
|
|> 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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue