From e28d990ecba287d5c44ed04c0039b43c8f309e50 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 26 Nov 2021 14:46:29 -0600 Subject: [PATCH] v2 Suggestions: don't skip visibility check --- .../web/mastodon_api/controllers/suggestion_controller.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex b/lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex index a34da98df..4f92c1f46 100644 --- a/lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex @@ -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