Replace `user.following` with Pleroma.FollowingRelationship
[akkoma] / lib / pleroma / web / mastodon_api / controllers / search_controller.ex
index 9f39b00f83af3684b822d8137169e992876d4025..6cfd68a84b0d60e16fd2c3bbb6a0b42ee7e5f0ff 100644 (file)
@@ -20,6 +20,8 @@ defmodule Pleroma.Web.MastodonAPI.SearchController do
   # Note: Mastodon doesn't allow unauthenticated access (requires read:accounts / read:search)
   plug(OAuthScopesPlug, %{scopes: ["read:search"], fallback: :proceed_unauthenticated})
 
+  plug(Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug)
+
   plug(RateLimiter, :search when action in [:search, :search2, :account_search])
 
   def account_search(%{assigns: %{user: user}} = conn, %{"q" => query} = params) do