Skip to content

Commit 2a497a8

Browse files
Gargronimrasalghul
authored andcommitted
Fix not being able to enable status notifications in Web Push API (mastodon#14822)
1 parent 070093c commit 2a497a8

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
@@ -52,6 +52,6 @@ def subscription_params
5252
def data_params
5353
return {} if params[:data].blank?
5454

55-
params.require(:data).permit(alerts: [:follow, :follow_request, :favourite, :reblog, :mention, :poll])
55+
params.require(:data).permit(alerts: [:follow, :follow_request, :favourite, :reblog, :mention, :poll, :status])
5656
end
5757
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
reblog: alerts_enabled,
2323
mention: alerts_enabled,
2424
poll: alerts_enabled,
25+
status: 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, :follow_request, :favourite, :reblog, :mention, :poll])
61+
@data_params ||= params.require(:data).permit(alerts: [:follow, :follow_request, :favourite, :reblog, :mention, :poll, :status])
6162
end
6263
end

0 commit comments

Comments
 (0)