Skip to content

Commit

Permalink
Merge pull request #2953 from ClearlyClaire/glitch-soc/merge-upstream
Browse files Browse the repository at this point in the history
Merge upstream changes up to 3178acc
  • Loading branch information
ClearlyClaire authored Jan 23, 2025
2 parents 78a4d61 + 45093e7 commit 43e1a24
Show file tree
Hide file tree
Showing 146 changed files with 951 additions and 1,375 deletions.
6 changes: 5 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ GEM
activesupport (>= 3.0)
nokogiri (>= 1.6)
io-console (0.8.0)
irb (1.14.3)
irb (1.15.1)
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jd-paperclip-azure (3.0.0)
Expand Down Expand Up @@ -568,6 +569,8 @@ GEM
pg (1.5.9)
pghero (3.6.1)
activerecord (>= 6.1)
pp (0.6.2)
prettyprint
premailer (1.27.0)
addressable
css_parser (>= 1.19.0)
Expand All @@ -576,6 +579,7 @@ GEM
actionmailer (>= 3)
net-smtp
premailer (~> 1.7, >= 1.7.9)
prettyprint (0.2.0)
propshaft (1.1.0)
actionpack (>= 7.0.0)
activesupport (>= 7.0.0)
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/api/v1/push/subscriptions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ def check_push_subscription
end

def subscription_params
params.require(:subscription).permit(:endpoint, :standard, keys: [:auth, :p256dh])
params.expect(subscription: [:endpoint, :standard, keys: [:auth, :p256dh]])
end

def data_params
return {} if params[:data].blank?

params.require(:data).permit(:policy, alerts: Notification::TYPES)
params.expect(data: [:policy, alerts: Notification::TYPES])
end
end
4 changes: 2 additions & 2 deletions app/controllers/api/web/push_subscriptions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def set_push_subscription
end

def subscription_params
@subscription_params ||= params.require(:subscription).permit(:standard, :endpoint, keys: [:auth, :p256dh])
@subscription_params ||= params.expect(subscription: [:standard, :endpoint, keys: [:auth, :p256dh]])
end

def web_push_subscription_params
Expand All @@ -82,6 +82,6 @@ def web_push_subscription_params
end

def data_params
@data_params ||= params.require(:data).permit(:policy, alerts: Notification::TYPES)
@data_params ||= params.expect(data: [:policy, alerts: Notification::TYPES])
end
end
2 changes: 1 addition & 1 deletion app/controllers/disputes/appeals_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ def set_strike
end

def appeal_params
params.require(:appeal).permit(:text)
params.expect(appeal: [:text])
end
end
2 changes: 1 addition & 1 deletion app/controllers/filters_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def set_filter
end

def resource_params
params.require(:custom_filter).permit(:title, :expires_in, :filter_action, context: [], keywords_attributes: [:id, :keyword, :whole_word, :_destroy])
params.expect(custom_filter: [:title, :expires_in, :filter_action, context: [], keywords_attributes: [[:id, :keyword, :whole_word, :_destroy]]])
end

def set_cache_headers
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/invites_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def invites
end

def resource_params
params.require(:invite).permit(:max_uses, :expires_in, :autofollow, :comment)
params.expect(invite: [:max_uses, :expires_in, :autofollow, :comment])
end

def set_cache_headers
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/settings/aliases_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def destroy
private

def resource_params
params.require(:account_alias).permit(:acct)
params.expect(account_alias: [:acct])
end

def set_alias
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/settings/deletes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def destroy
private

def resource_params
params.require(:form_delete_confirmation).permit(:password, :username)
params.expect(form_delete_confirmation: [:password, :username])
end

def require_not_suspended!
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/settings/featured_tags_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ def set_recently_used_tags
end

def featured_tag_params
params.require(:featured_tag).permit(:name)
params.expect(featured_tag: [:name])
end
end
2 changes: 1 addition & 1 deletion app/controllers/settings/imports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def destroy
private

def import_params
params.require(:form_import).permit(:data, :type, :mode)
params.expect(form_import: [:data, :type, :mode])
end

def set_bulk_import
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/settings/migration/redirects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ def destroy
private

def resource_params
params.require(:form_redirect).permit(:acct, :current_password, :current_username)
params.expect(form_redirect: [:acct, :current_password, :current_username])
end
end
2 changes: 1 addition & 1 deletion app/controllers/settings/migrations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def create
private

def resource_params
params.require(:account_migration).permit(:acct, :current_password, :current_username)
params.expect(account_migration: [:acct, :current_password, :current_username])
end

def set_migrations
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/settings/privacy_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def update
private

def account_params
params.require(:account).permit(:discoverable, :unlocked, :indexable, :show_collections, settings: UserSettings.keys)
params.expect(account: [:discoverable, :unlocked, :indexable, :show_collections, settings: UserSettings.keys])
end

def set_account
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/settings/profiles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def update
private

def account_params
params.require(:account).permit(:display_name, :note, :avatar, :header, :bot, fields_attributes: [:name, :value])
params.expect(account: [:display_name, :note, :avatar, :header, :bot, fields_attributes: [[:name, :value]]])
end

def set_account
Expand Down
4 changes: 1 addition & 3 deletions app/controllers/statuses_cleanup_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ def update
else
render :show
end
rescue ActionController::ParameterMissing
# Do nothing
end

def require_functional!
Expand All @@ -30,7 +28,7 @@ def set_policy
end

def resource_params
params.require(:account_statuses_cleanup_policy).permit(:enabled, :min_status_age, :keep_direct, :keep_pinned, :keep_polls, :keep_media, :keep_self_fav, :keep_self_bookmark, :min_favs, :min_reblogs)
params.expect(account_statuses_cleanup_policy: [:enabled, :min_status_age, :keep_direct, :keep_pinned, :keep_polls, :keep_media, :keep_self_fav, :keep_self_bookmark, :min_favs, :min_reblogs])
end

def set_cache_headers
Expand Down

This file was deleted.

Loading

0 comments on commit 43e1a24

Please sign in to comment.