Browse Source

Fix web push notifications for polls (#10864)

Fixes #10861
pull/4/head
ThibG 4 years ago
committed by Eugen Rochko
parent
commit
fe3b863926
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      app/controllers/api/v1/push/subscriptions_controller.rb
  2. +2
    -1
      app/controllers/api/web/push_subscriptions_controller.rb

+ 1
- 1
app/controllers/api/v1/push/subscriptions_controller.rb View 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

+ 2
- 1
app/controllers/api/web/push_subscriptions_controller.rb View 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

Loading…
Cancel
Save