Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `README.md`: Upstream updated copyright year, we don't mention it so kept our version. - `app/controllers/admin/dashboard_controller.rb`: Not really a conflict, upstream change (removing the spam checker) too close to glitch-soc changes. Ported upstream changes. - `app/models/form/admin_settings.rb`: Same. - `app/services/remove_status_service.rb`: Same. - `app/views/admin/settings/edit.html.haml`: Same. - `config/settings.yml`: Same. - `config/environments/production.rb`: Not a real conflict, upstream added a default HTTP header, but we have extra headers in glitch-soc. Added the header.
This commit is contained in:
@@ -21,6 +21,10 @@ class Form::AccountBatch
|
||||
approve!
|
||||
when 'reject'
|
||||
reject!
|
||||
when 'suppress_follow_recommendation'
|
||||
suppress_follow_recommendation!
|
||||
when 'unsuppress_follow_recommendation'
|
||||
unsuppress_follow_recommendation!
|
||||
end
|
||||
end
|
||||
|
||||
@@ -79,4 +83,18 @@ class Form::AccountBatch
|
||||
records.each { |account| authorize(account.user, :reject?) }
|
||||
.each { |account| DeleteAccountService.new.call(account, reserve_email: false, reserve_username: false) }
|
||||
end
|
||||
|
||||
def suppress_follow_recommendation!
|
||||
authorize(:follow_recommendation, :suppress?)
|
||||
|
||||
accounts.each do |account|
|
||||
FollowRecommendationSuppression.create(account: account)
|
||||
end
|
||||
end
|
||||
|
||||
def unsuppress_follow_recommendation!
|
||||
authorize(:follow_recommendation, :unsuppress?)
|
||||
|
||||
FollowRecommendationSuppression.where(account_id: account_ids).destroy_all
|
||||
end
|
||||
end
|
||||
|
@@ -35,7 +35,6 @@ class Form::AdminSettings
|
||||
mascot
|
||||
show_reblogs_in_public_timelines
|
||||
show_replies_in_public_timelines
|
||||
spam_check_enabled
|
||||
trends
|
||||
trendable_by_default
|
||||
show_domain_blocks
|
||||
@@ -59,7 +58,6 @@ class Form::AdminSettings
|
||||
enable_keybase
|
||||
show_reblogs_in_public_timelines
|
||||
show_replies_in_public_timelines
|
||||
spam_check_enabled
|
||||
trends
|
||||
trendable_by_default
|
||||
noindex
|
||||
|
Reference in New Issue
Block a user