Merge branch 'issue/1348' into 'develop'
[akkoma] / lib / pleroma / web / mastodon_api / controllers / subscription_controller.ex
index e2b17aab1ebd7e7bc894bc65f0d6a11f4203ad08..fc7d52824e48231691d6beaf048ae0e0617ee485 100644 (file)
@@ -12,6 +12,10 @@ defmodule Pleroma.Web.MastodonAPI.SubscriptionController do
 
   action_fallback(:errors)
 
+  plug(Pleroma.Plugs.OAuthScopesPlug, %{scopes: ["push"]})
+
+  plug(Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug)
+
   # Creates PushSubscription
   # POST /api/v1/push/subscription
   #