]> cat aescling's git repositories - mastodon.git/commitdiff
Fix web push notifications for polls (#10864)
authorThibG <thib@sitedethib.com>
Mon, 27 May 2019 22:26:08 +0000 (00:26 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 27 May 2019 22:26:08 +0000 (00:26 +0200)
Fixes #10861

app/controllers/api/v1/push/subscriptions_controller.rb
app/controllers/api/web/push_subscriptions_controller.rb

index 1a19bd0ef6e9fd0c7c12481da0cdd8ef8faf310a..1b658f87083d5f293986fc2f99b125dbc0a2661a 100644 (file)
@@ -51,6 +51,6 @@ class Api::V1::Push::SubscriptionsController < Api::BaseController
 
   def data_params
     return {} if params[:data].blank?
-    params.require(:data).permit(alerts: [:follow, :favourite, :reblog, :mention])
+    params.require(:data).permit(alerts: [:follow, :favourite, :reblog, :mention, :poll])
   end
 end
index fe8e42580880821c7bd6de725aae459a85b7c735..d8153e082feafdf2e2608492cf227fa93bcbb9e4 100644 (file)
@@ -22,6 +22,7 @@ class Api::Web::PushSubscriptionsController < Api::Web::BaseController
         favourite: alerts_enabled,
         reblog: alerts_enabled,
         mention: alerts_enabled,
+        poll: 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, :favourite, :reblog, :mention])
+    @data_params ||= params.require(:data).permit(alerts: [:follow, :favourite, :reblog, :mention, :poll])
   end
 end