diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-02-23 20:04:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 20:04:23 +0100 |
commit | 8c9c05d57914236dc7104a67e84743e1ce36f7cc (patch) | |
tree | 645c19df410f74da25f2531d140013e90b930de4 /app/controllers/api | |
parent | 2c8615fbf8f8085eb836733b27b33c9522c29c71 (diff) | |
parent | 55692978ecb1f3fc9049f976de5764b7a24f4de9 (diff) |
Merge pull request #1700 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/web/push_subscriptions_controller.rb | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/app/controllers/api/web/push_subscriptions_controller.rb b/app/controllers/api/web/push_subscriptions_controller.rb index db2512e5f..5167928e9 100644 --- a/app/controllers/api/web/push_subscriptions_controller.rb +++ b/app/controllers/api/web/push_subscriptions_controller.rb @@ -17,17 +17,7 @@ class Api::Web::PushSubscriptionsController < Api::Web::BaseController data = { policy: 'all', - - alerts: { - follow: alerts_enabled, - follow_request: alerts_enabled, - favourite: alerts_enabled, - reblog: alerts_enabled, - mention: alerts_enabled, - poll: alerts_enabled, - status: alerts_enabled, - update: alerts_enabled, - }, + alerts: Notification::TYPES.index_with { alerts_enabled }, } data.deep_merge!(data_params) if params[:data] @@ -62,15 +52,6 @@ class Api::Web::PushSubscriptionsController < Api::Web::BaseController end def data_params - @data_params ||= params.require(:data).permit(:policy, alerts: [ - :follow, - :follow_request, - :favourite, - :reblog, - :mention, - :poll, - :status, - :update, - ]) + @data_params ||= params.require(:data).permit(:policy, alerts: Notification::TYPES) end end |