logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: e28d990ecba287d5c44ed04c0039b43c8f309e50
parent b17360cd7c92d8b2337fa4fd175c3e1312eb352e
Author: Alex Gleason <alex@alexgleason.me>
Date:   Fri, 26 Nov 2021 14:46:29 -0600

v2 Suggestions: don't skip visibility check

Diffstat:

Mlib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex4++--
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 @@ -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