Skip to content

Commit fe3b863

Browse files
ClearlyClaireGargron
authored andcommitted
Fix web push notifications for polls (#10864)
Fixes #10861
1 parent 451e598 commit fe3b863

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ def subscription_params
5151

5252
def data_params
5353
return {} if params[:data].blank?
54-
params.require(:data).permit(alerts: [:follow, :favourite, :reblog, :mention])
54+
params.require(:data).permit(alerts: [:follow, :favourite, :reblog, :mention, :poll])
5555
end
5656
end

app/controllers/api/web/push_subscriptions_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def create
2222
favourite: alerts_enabled,
2323
reblog: alerts_enabled,
2424
mention: alerts_enabled,
25+
poll: alerts_enabled,
2526
},
2627
}
2728

@@ -57,6 +58,6 @@ def subscription_params
5758
end
5859

5960
def data_params
60-
@data_params ||= params.require(:data).permit(alerts: [:follow, :favourite, :reblog, :mention])
61+
@data_params ||= params.require(:data).permit(alerts: [:follow, :favourite, :reblog, :mention, :poll])
6162
end
6263
end

0 commit comments

Comments
 (0)