about summary refs log tree commit diff
path: root/app/services/block_domain_service.rb
AgeCommit message (Collapse)Author
2020-11-14Merge remote-tracking branch 'upstream/master' into merge-glitchFire Demon
2020-11-08Add support for reversible suspensions through ActivityPub (#14989)Eugen Rochko
2020-09-30Merge remote-tracking branch 'upstream/master' into merge-glitchFire Demon
2020-09-15Change account suspensions to be reversible by default (#14726)Eugen Rochko
2020-09-10[Moderation, Privacy] Ask remote servers to purge local account content when ↵Fire Demon
defederating
2020-06-09Make domain block/silence/reject-media code more robust (#13424)ThibG
* Split media cleanup from reject-media domain blocks to its own service * Slightly improve ClearDomainMediaService error handling * Lower DomainClearMediaWorker to lowest-priority queue * Do not catch ActiveRecord::RecordNotFound in domain block workers * Fix DomainBlockWorker spec labels * Add some specs * Change domain blocks to immediately mark accounts as suspended Rather than doing so sequentially, account after account, while cleaning their data. This doesn't change much about the time the block takes to complete, but it immediately prevents interaction with the blocked domain, while up to now, it would only be guaranteed when the process ends.
2019-11-21Change domain block behavior to update user records before deleting data ↵ThibG
(#12247) When suspending or silencing a domain, one probably wants the silence or suspend parts to take effect as soon as possible. Deleting media files can take a while (possibly days), so perform silencing as soon as possible, and clean up media afterwards.
2019-09-11Change deletes to preserve soft-deleted statuses in unresolved reports (#11805)Eugen Rochko
Change all account actions except "none" to resolve all unresolved reports Refactor `SuspendAccountService` to be more readable
2019-08-07Add domain block notes (#11515)ThibG
* Add database columns for adding notes to domain blocks/restrctions * Add admin UI to set private and public comments when blocking a domain * Add text for private and public comments on domain blocks * Show domain block comments in admin UI * Add comments to the domain block undo page * Make UnblockDomainService more robust regarding upgraded domain blocks * Allow editing domain blocks * Rename button from “undo domain block” to “view domain block” in account admin UI * Change test to unsilence silenced users from upgraded blocks
2019-07-06Remove Salmon and PubSubHubbub (#11205)Eugen Rochko
* Remove Salmon and PubSubHubbub endpoints * Add error when trying to follow OStatus accounts * Fix new accounts not being created in ResolveAccountService
2019-06-22Change domain blocks to automatically support subdomains (#11138)Eugen Rochko
* Change domain blocks to automatically support subdomains If a more authoritative domain is blocked (example.com), then the same block will be applied to a subdomain (foo.example.com) * Match subdomains of existing accounts when blocking/unblocking domains * Improve code style
2019-05-14Record account suspend/silence time and keep track of domain blocks (#10660)ThibG
* Record account suspend/silence time and keep track of domain blocks * Also unblock users who were suspended/silenced before dates were recorded * Add tests * Keep track of suspending date for users suspended through the CLI * Show accurate number of accounts that would be affected by unsuspending an instance * Change migration to set silenced_at and suspended_at * Revert "Also unblock users who were suspended/silenced before dates were recorded" This reverts commit a015c65d2d1e28c7b7cfab8b3f8cd5fb48b8b71c. * Switch from using suspended and silenced to suspended_at and silenced_at * Add post-deployment migration script to remove `suspended` and `silenced` columns * Use Account#silence! and Account#suspend! instead of updating the underlying property * Add silenced_at and suspended_at migration to post-migration * Change account fabricator to translate suspended and silenced attributes * Minor fixes * Make unblocking domains always retroactive
2018-08-21Get rid of all batch order warnings (#8334)Eugen Rochko
2018-03-08After blocking domain with reject_media, invalidate cache (#6679)Eugen Rochko
Media attachments are part of the association cache of statuses, since they are presumed to be immutable. Unless this cache is cleared manually, the statuses will continue to look like they have media embedded.
2017-09-19Admin interface for listing, adding and removing custom emojis (#5002)Eugen Rochko
* Admin interface for listing, adding and removing custom emojis * Only display local ones in the list
2017-08-21Do not try to re-subscribe to unsubscribed accounts (#4653)Eugen Rochko
2017-07-24Allow domain blocks that only reject media without silencing or suspending ↵sdukhovni
(#4325) * Allow domain blocks to reject media without silencing or suspending * Fix typo * Hide 'Reject media' button when superfluous, instead of disabling it * Properly hide 'reject media' checkbox on page load if needed This may happen when resubmitting the domain block form after an error. * Don't ask whether undoing a media-only block should be retroactive * Rename :media_only block to :noop * Display :noop block as None in frontend, allow blocks that do nothing * Remove 'coding' line auto-added by emacs
2017-05-20Use joins for account properties (#3167)Akihiko Odaki
2017-05-06Refactor domain_blocks_controller (#2843)alpaca-tc
* Set domain_block by before_action * Cast value with ActiveRecord::Type * Batch update
2017-04-29Set unknown attachment type when adding domain blocks (#2605)Patrick Figel
Follow-up to #2599. When a domain block with `reject_media` is added or `rake mastodon:media:remove_remote` is invoked, mastodon deletes the locally cached attachments and avatars but does not reflect that change in the database, causing the `file` fields to still have values. This change persists the deletion in the database and sets the attachment type to unknown. This also introduces a one-off rake task that sets all attachments without a local file to the "unknown" type. The upgrade notes for the next release should contain a post-upgrade step with `rake mastodon:media:set_unknown`.
2017-04-26Domain block service cleanup (#2490)Matt Jankowski
* Add coverage for domain block service with silence * Get rid of warning about find_each and order * Move domain_block to attr_reader * Move optional clear_media into silence_accounts method * Use blocked_domain method to reduce passed vars * Extract blocked_domain_accounts method to find accounts on the domain * Extract media_from_blocked_domain method to find relevant attachments * Separate destruction of account images and account attachments
2017-04-16Make file attachment on MediaAttachment optional (#1865)Eugen
Create MediaAttachment but without actual file download when domain is blocked with reject_media set to true Clean up old media files when creating a new domain block with reject_media set to true Return remote_url in media attachments API if local file is not present Undo domain block action in admin UI Ability to enable reject_media from admin UI
2017-04-03Make default admin UI page reports. Add admin UI for creating a domain blockEugen Rochko
2017-01-23Domain blocks now have varying severity - auto-suspend vs auto-silenceEugen Rochko
2016-11-15Fix rubocop issues, introduce usage of frozen literal to improve performanceEugen Rochko
2016-10-23Fix public channelEugen Rochko
2016-10-10PuSH unsubscribe needs correct callback URLEugen Rochko
2016-10-09Adding domain blocksEugen Rochko