Merge branch 'chore/bump-hackney' into 'develop'
[akkoma] / lib / pleroma / web / mastodon_api / controllers / notification_controller.ex
index dcb421756631931b7c4c09547c317e919170f264..bcd12c73f74678e36897152c6d982691520a30af 100644 (file)
@@ -5,7 +5,7 @@
 defmodule Pleroma.Web.MastodonAPI.NotificationController do
   use Pleroma.Web, :controller
 
-  import Pleroma.Web.ControllerHelper, only: [add_link_headers: 2, skip_relationships?: 1]
+  import Pleroma.Web.ControllerHelper, only: [add_link_headers: 2]
 
   alias Pleroma.Notification
   alias Pleroma.Plugs.OAuthScopesPlug
@@ -13,7 +13,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationController do
 
   @oauth_read_actions [:show, :index]
 
-  plug(OpenApiSpex.Plug.CastAndValidate, render_error: Pleroma.Web.ApiSpec.RenderError)
+  plug(Pleroma.Web.ApiSpec.CastAndValidate)
 
   plug(
     OAuthScopesPlug,
@@ -22,8 +22,6 @@ defmodule Pleroma.Web.MastodonAPI.NotificationController do
 
   plug(OAuthScopesPlug, %{scopes: ["write:notifications"]} when action not in @oauth_read_actions)
 
-  plug(Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug)
-
   defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.NotificationOperation
 
   # GET /api/v1/notifications
@@ -52,8 +50,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationController do
     |> add_link_headers(notifications)
     |> render("index.json",
       notifications: notifications,
-      for: user,
-      skip_relationships: skip_relationships?(params)
+      for: user
     )
   end