about summary refs log tree commit diff
path: root/app/services/delete_account_service.rb
AgeCommit message (Collapse)Author
2021-03-24Update Mastodon to Rails 6.1 (#15910)Claire
* Update devise-two-factor to unreleased fork for Rails 6 support Update tests to match new `rotp` version. * Update nsa gem to unreleased fork for Rails 6 support * Update rails to 6.1.3 and rails-i18n to 6.0 * Update to unreleased fork of pluck_each for Ruby 6 support * Run "rails app:update" * Add missing ActiveStorage config file * Use config.ssl_options instead of removed ApplicationController#force_ssl Disabled force_ssl-related tests as they do not seem to be easily testable anymore. * Fix nonce directives by removing Rails 5 specific monkey-patching * Fix fixture_file_upload deprecation warning * Fix yield-based test failing with Rails 6 * Use Rails 6's index_with when possible * Use ActiveRecord::Cache::Store#delete_multi from Rails 6 This will yield better performances when deleting an account * Disable Rails 6.1's automatic preload link headers Since Rails 6.1, ActionView adds preload links for javascript files in the Links header per default. In our case, that will bloat headers too much and potentially cause issues with reverse proxies. Furhermore, we don't need those links, as we already output them as HTML link tags. * Switch to Rails 6.0 default config * Switch to Rails 6.1 default config * Do not include autoload paths in the load path
2020-12-24Fix undefined method error when batch-removing statuses with ElasticSearch ↵Eugen Rochko
on (#15421)
2020-12-23Fix mentions not being deleted efficiently (#15416)ThibG
As a regression from the recent optimizations, mentions were left untouched until `account.destroy`, which would then delete them individually, and executing queries to find and delete associated notifications, resulting in a massive slowdown. Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-23Improve performances of deleting favourites when deleting accounts (#15412)ThibG
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-22Improve account deletion performances further (#15407)ThibG
* Delete status records by batches of 50 * Do not precompute values that are only used once * Do not generate redis events for removal of public toots older than two weeks * Filter reported toots a priori for polls and status deletion * Do not process reblogs when cleaning up public timelines As in Mastodon proper, reblogs don't appear in public TLs * Clean the deleted account's own feed in one go * Refactor Account#clean_feed_manager and List#clean_feed_manager * Delete instead of destroy a few more associations * Fix preloading Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-22Fix unnecessary queries when batch-removing statuses, 100x faster (#15387)Eugen Rochko
2020-12-21Fix some notifications not being deleted on poll/status deletion (#15402)ThibG
* Fix deleting polls not deleting notifications * Fix fav notification deletion when deleting a toot * Refactor DeleteAccountService spec * Add DeleteAccountService tests for other associations and notifications * Add favourite handling spec in status removal Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-20Fix AccountDeletionWorker crashing and clogging sidekiq queues (#15380)ThibG
* Fix account deletion workers being queued multiple times for a single account * Fix poll votes being unnecessarily instantiated on poll deletion * Fix favourites being unnecessarily instantiated on status deletion * Remove inaccurate comments * Delete polls instead of destroying them Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-11-21Undo outgoing follows when suspending a remote account (#15188)ThibG
2020-11-19Fix sending spurious Rejects when processing remote account deletion (#15104)ThibG
* Fix sending spurious Rejects when processing remote account deletion * Make skip_side_effects imply skip_activitypub
2020-11-08Add support for reversible suspensions through ActivityPub (#14989)Eugen Rochko
2020-09-15Change account suspensions to be reversible by default (#14726)Eugen Rochko