[#2456] Removed support for embedded relationships in account view.
[akkoma] / lib / pleroma / web / mastodon_api / controllers / search_controller.ex
index 0e0d54ba41891a9cfe400e2afdcf9c2f35ead2eb..c30ae1c7aba23cd4a3cf0b665a86c3fd4fe389c2 100644 (file)
@@ -5,8 +5,6 @@
 defmodule Pleroma.Web.MastodonAPI.SearchController do
   use Pleroma.Web, :controller
 
-  import Pleroma.Web.ControllerHelper, only: [skip_relationships?: 1]
-
   alias Pleroma.Activity
   alias Pleroma.Plugs.OAuthScopesPlug
   alias Pleroma.Plugs.RateLimiter
@@ -71,7 +69,6 @@ defmodule Pleroma.Web.MastodonAPI.SearchController do
 
   defp search_options(params, user) do
     [
-      skip_relationships: skip_relationships?(params),
       resolve: params[:resolve],
       following: params[:following],
       limit: params[:limit],
@@ -89,8 +86,7 @@ defmodule Pleroma.Web.MastodonAPI.SearchController do
     AccountView.render("index.json",
       users: accounts,
       for: options[:for_user],
-      as: :user,
-      skip_relationships: false
+      as: :user
     )
   end
 
@@ -100,8 +96,7 @@ defmodule Pleroma.Web.MastodonAPI.SearchController do
     StatusView.render("index.json",
       activities: statuses,
       for: options[:for_user],
-      as: :activity,
-      skip_relationships: options[:skip_relationships]
+      as: :activity
     )
   end