]> cat aescling's git repositories - mastodon.git/commitdiff
Fix not being able to enable status notifications in Web Push API (#14822)
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 21 Sep 2020 15:48:55 +0000 (17:48 +0200)
committerGitHub <noreply@github.com>
Mon, 21 Sep 2020 15:48:55 +0000 (17:48 +0200)
app/controllers/api/v1/push/subscriptions_controller.rb
app/controllers/api/web/push_subscriptions_controller.rb

index d34b333eb3ae8a3bfd423c6ac25d5b0e576bed1a..0918c61e972747c4ded6fbfc599cbacf3659bd20 100644 (file)
@@ -52,6 +52,6 @@ class Api::V1::Push::SubscriptionsController < Api::BaseController
   def data_params
     return {} if params[:data].blank?
 
-    params.require(:data).permit(alerts: [:follow, :follow_request, :favourite, :reblog, :mention, :poll])
+    params.require(:data).permit(alerts: [:follow, :follow_request, :favourite, :reblog, :mention, :poll, :status])
   end
 end
index 7916b82fa081535f5d692a1f0639c944d834114b..1dce3e70f2aec090499e8debba0745dec3a17879 100644 (file)
@@ -22,6 +22,7 @@ class Api::Web::PushSubscriptionsController < Api::Web::BaseController
         reblog: alerts_enabled,
         mention: alerts_enabled,
         poll: alerts_enabled,
+        status: alerts_enabled,
       },
     }
 
@@ -57,6 +58,6 @@ class Api::Web::PushSubscriptionsController < Api::Web::BaseController
   end
 
   def data_params
-    @data_params ||= params.require(:data).permit(alerts: [:follow, :follow_request, :favourite, :reblog, :mention, :poll])
+    @data_params ||= params.require(:data).permit(alerts: [:follow, :follow_request, :favourite, :reblog, :mention, :poll, :status])
   end
 end