about summary refs log tree commit diff
path: root/app/services/block_domain_service.rb
AgeCommit message (Collapse)Author
2020-02-27port tootsuite#11805 to monserfork: Change deletes to preserve soft-deleted ↵Eugen Rochko
statuses in unresolved reports Change all account actions except "none" to resolve all unresolved reports Refactor `SuspendAccountService` to be more readable
2020-02-21port tootsuite#11138 to monsterfork: Change domain blocks to automatically ↵Eugen Rochko
support subdomains * 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
2020-02-17add a `manual_only` (manual trust only) moderation option + handle more ↵multiple creatures
`reject_unknown`/graylist mode caveats
2019-12-07don't count faves as indicators for known accountsmultiple creatures
2019-12-01`update` -> `update!`multiple creatures
2019-08-30use a scheduled task to batch domain policy changes + revert `29643fd6` to ↵multiple creatures
avoid accidentally dosing servers when multiple users block a domain
2019-08-08add new `reject unknown` policy option to prevent spam & harassment from ↵multiple creatures
large/undermoderated servers
2019-07-31ability to add domain moderation notes, edit existing domain policies ↵multiple creatures
in-place, and process asynchronously
2019-07-25add all `ActionLog`-able admin & moderator actions to loggermultiple creatures
2019-07-24transparancy - log use of admin related method calls & activitypub ↵multiple creatures
auto-rejections to a logger account
2019-07-21we don't need `invalidate_association_caches!`multiple creatures
2019-05-21clear status caches when someone is moderated force unlisted or force sensitivemultiple creatures
2019-05-21Moderation: add `force sensitive` and `force unlisted` actions. Accounts: ↵multiple creatures
add federatable `adult content` tag. Handle from remote accounts as well.
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