Browse Source

Fix not being able to enable status notifications in Web Push API (#14822)

closed-social-v3
Eugen Rochko 4 years ago
committed by GitHub
parent
commit
8c8bf0289f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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

@ -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

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

Loading…
Cancel
Save