mirror of
https://git.youjo.love/youjo/youjo-be.git
synced 2024-11-20 13:59:55 +01:00
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)
|
||||
|
||||
@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 @@ defmodule Pleroma.Web.MastodonAPI.SuggestionController 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 a new issue