Commit Graph

150 Commits (00d94f3ffabda89a2f955212e763cdba3f1f54c6)

Author SHA1 Message Date
Matt Jankowski 98ef38e34e
Ensure unique values in fabricators (#29515) 10 months ago
Eugen Rochko 50b17f7e10
Add notification policies and notification requests (#29366) 10 months ago
Matt Jankowski 14c65180df
Use sequence in `software_update` fabricator to allow multiple (#29438) 10 months ago
Matt Jankowski cd37048439
Move followable_by coverage to suggestions (#28697) 12 months ago
Matt Jankowski af366f65ee
Add spec coverage for `models/form/custom_emoji_batch` class (#28388) 1 year ago
Matt Jankowski 28e1a7a394
Improve spec coverage for `models/announcement` class (#28350) 1 year ago
Matt Jankowski e48ecd2929
Remove `default_scope` from `Admin::ActionLog` (#28026) 1 year ago
Matt Jankowski 9a01a260a0
Convert `api/v1/scheduled_statuses` controller spec to request spec (#27986) 1 year ago
Matt Jankowski 155fb84141
Improve spec coverage for collection of `workers/` classes (#27874) 1 year ago
Matt Jankowski 63c9102f8a
Fix `RSpec/MessageChain` cop (#27776) 1 year ago
Matt Jankowski cfa14ec6d1
Fix `Lint/EmptyBlock` cop (#27748) 1 year ago
Claire 16681e0f20
Add admin notifications for new Mastodon versions (#26582) 1 year ago
Matt Jankowski 2c88364222
Restore console behavior in `test` env (#26401) 1 year ago
Matt Jankowski 7581b1ff96
Profiling tools configuration improvement (#25383) 1 year ago
Claire 1e3b19230a
Add stricter protocol fields validation for accounts (#25937) 1 year ago
Matt Jankowski 07933db788
Add coverage for `CLI::Cache` command (#25238) 2 years ago
Daniel M Brasil 4301d8cbb3
Migrate to request specs in `/api/v1/admin/domain_allows` (#25333) 2 years ago
Matt Jankowski 3a2a15c6ea
Use `build` where possible in fabricators (#25360) 2 years ago
Daniel M Brasil b473df9a14
Improve test coverage for `/api/v1/featured_tags` (#25076) 2 years ago
Daniel M Brasil 4a22e72b9b
Improve test coverage for `/api/v1/admin/canonical_email_blocks` (#24985) 2 years ago
Matt Jankowski 604e1c2b11
Remove usage of random sample values in specs (#24869) 2 years ago
Claire 32a030dd74
Rewrite import feature (#21054) 2 years ago
Matt Jankowski 36eeb70d53
Spec coverage on Settings/ controllers specs (#24221) 2 years ago
Matt Jankowski 56bddfbfa3
Serializers spec coverage (#24017) 2 years ago
Matt Jankowski 2d1ccb3d8b
Restore missing fabricators (#23951) 2 years ago
Matt Jankowski cd99fa8ceb
Fabricator specs (#23925) 2 years ago
Matt Jankowski f9c2213ae5
Models specs coverage (#23940) 2 years ago
Stanislav Dobrovolschii d9271126ce
Add rspecs for FollowRecommendationsScheduler (#23890) 2 years ago
Nick Schonning 8fd3fc404d
Autofix Rubocop Rails/RootPathnameMethods (#23760) 2 years ago
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs (#23790) 2 years ago
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals (#23695) 2 years ago
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length (#23632) 2 years ago
Claire 13a2abacc8
Add `roles` attribute to Account entities in REST API (#23255) 2 years ago
pea-sys c68e6b52d9
png optimization(loss less) (#19630) 2 years ago
Eugen Rochko 45ebdb72ca
Add support for language preferences for trending statuses and links (#18288) 2 years ago
Eugen Rochko 5c9abdeff1
Add retention policy for cached content and media (#19232) 2 years ago
Claire 50487db122
Add ability to filter individual posts (#18945)
* Add database table for status-specific filters

* Add REST endpoints, entities and attributes

* Show status filters in /filters interface

* Perform server-side filtering for individual posts filters

* Fix filtering on context mismatch

* Refactor `toServerSideType` by moving it to its own module

* Move loupe and delete icons to their own module

* Add ability to filter individual posts from WebUI

* Replace keyword list by warnings (expired, context mismatch)

* Refactor server-side filtering code

* Add tests
2 years ago
Claire 461239db5d
Fix backend compatibility with OpenSSL 3.0 (#18449)
* Update webpush to fork with OpenSSL 3 compatibility

* Fix tests with OpenSSL 3.0

* Update webauthn gem to latest release and update dependencies
2 years ago
Eugen Rochko c3f0621a59
Add ability to follow hashtags (#18809) 2 years ago
Eugen Rochko 44b2ee3485
Add customizable user roles (#18641)
* Add customizable user roles

* Various fixes and improvements

* Add migration for old settings and fix tootctl role management
3 years ago
Claire 02851848e9
Revamp post filtering system (#18058)
* Add model for custom filter keywords

* Use CustomFilterKeyword internally

Does not change the API

* Fix /filters/edit and /filters/new

* Add migration tests

* Remove whole_word column from custom_filters (covered by custom_filter_keywords)

* Redesign /filters

Instead of a list, present a card that displays more information and handles
multiple keywords per filter.

* Redesign /filters/new and /filters/edit to add and remove keywords

This adds a new gem dependency: cocoon, as well as a npm dependency:
cocoon-js-vanilla. Those are used to easily populate and remove form fields
from the user interface when manipulating multiple keyword filters at once.

* Add /api/v2/filters to edit filter with multiple keywords

Entities:
- `Filter`: `id`, `title`, `filter_action` (either `hide` or `warn`), `context`
  `keywords`
- `FilterKeyword`: `id`, `keyword`, `whole_word`

API endpoits:
- `GET /api/v2/filters` to list filters (including keywords)
- `POST /api/v2/filters` to create a new filter
  `keywords_attributes` can also be passed to create keywords in one request
- `GET /api/v2/filters/:id` to read a particular filter
- `PUT /api/v2/filters/:id` to update a new filter
  `keywords_attributes` can also be passed to edit, delete or add keywords in
   one request
- `DELETE /api/v2/filters/:id` to delete a particular filter
- `GET /api/v2/filters/:id/keywords` to list keywords for a filter
- `POST /api/v2/filters/:filter_id/keywords/:id` to add a new keyword to a
   filter
- `GET /api/v2/filter_keywords/:id` to read a particular keyword
- `PUT /api/v2/filter_keywords/:id` to edit a particular keyword
- `DELETE /api/v2/filter_keywords/:id` to delete a particular keyword

* Change from `irreversible` boolean to `action` enum

* Remove irrelevent `irreversible_must_be_within_context` check

* Fix /filters/new and /filters/edit with update for filter_action

* Fix Rubocop/Codeclimate complaining about task names

* Refactor FeedManager#phrase_filtered?

This moves regexp building and filter caching to the `CustomFilter` class.

This does not change the functional behavior yet, but this changes how the
cache is built, doing per-custom_filter regexps so that filters can be matched
independently, while still offering caching.

* Perform server-side filtering and output result in REST API

* Fix numerous filters_changed events being sent when editing multiple keywords at once

* Add some tests

* Use the new API in the WebUI

- use client-side logic for filters we have fetched rules for.
  This is so that filter changes can be retroactively applied without
  reloading the UI.
- use server-side logic for filters we haven't fetched rules for yet
  (e.g. network error, or initial timeline loading)

* Minor optimizations and refactoring

* Perform server-side filtering on the streaming server

* Change the wording of filter action labels

* Fix issues pointed out by linter

* Change design of “Show anyway” link in accordence to review comments

* Drop “irreversible” filtering behavior

* Move /api/v2/filter_keywords to /api/v1/filters/keywords

* Rename `filter_results` attribute to `filtered`

* Rename REST::LegacyFilterSerializer to REST::V1::FilterSerializer

* Fix systemChannelId value in streaming server

* Simplify code by removing client-side filtering code

The simplifcation comes at a cost though: filters aren't retroactively
applied anymore.
3 years ago
Claire 327eed0076
Fix suspicious sign-in mails never being sent (#18599)
* Add tests

* Fix suspicious sign-in mails never being sent
3 years ago
Eugen Rochko a2871cd747
Add administrative webhooks (#18510)
* Add administrative webhooks

* Fix error when webhook is deleted before delivery worker runs
3 years ago
Eugen Rochko 02b8d63fce
Fix report category not being saved in REST API (#17682) 3 years ago
Eugen Rochko 564efd0651
Add appeals (#17364)
* Add appeals

* Add ability to reject appeals and ability to browse pending appeals in admin UI

* Add strikes to account page in settings

* Various fixes and improvements

- Add separate notification setting for appeals, separate from reports
- Fix style of links in report/strike header
- Change approving an appeal to not restore statuses (due to federation complexities)
- Change style of successfully appealed strikes on account settings page
- Change account settings page to only show unappealed or recently appealed strikes

* Change appealed_at to overruled_at

* Fix missing method error
3 years ago
Claire e38fc319dc
Refactor and improve tests (#17386)
* Change account and user fabricators to simplify and improve tests

- `Fabricate(:account)` implicitly fabricates an associated `user` if
  no `domain` attribute is given (an account with `domain: nil` is
  considered a local account, but no user record was created), unless
  `user: nil` is passed
- `Fabricate(:account, user: Fabricate(:user))` should still be possible
  but is discouraged.

* Fix and refactor tests

- avoid passing unneeded attributes to `Fabricate(:user)` or
  `Fabricate(:account)`
- avoid embedding `Fabricate(:user)` into a `Fabricate(:account)` or the other
  way around
- prefer `Fabricate(:user, account_attributes: …)` to
  `Fabricate(:user, account: Fabricate(:account, …)`
- also, some tests were using remote accounts with local user records, which is
  not representative of production code.
3 years ago
Eugen Rochko 1060666c58
Add support for editing for published statuses (#16697)
* Add support for editing for published statuses

* Fix references to stripped-out code

* Various fixes and improvements

* Further fixes and improvements

* Fix updates being potentially sent to unauthorized recipients

* Various fixes and improvements

* Fix wrong words in test

* Fix notifying accounts that were tagged but were not in the audience

* Fix mistake
3 years ago
Eugen Rochko 14f436c457
Add notifications for statuses deleted by moderators (#17204) 3 years ago
Eugen Rochko 7de0ee7aba
Remove Keybase integration (#17045) 3 years ago
Claire 4ac78e2a06
Add feature to automatically delete old toots (#16529)
* Add account statuses cleanup policy model

* Record last inspected toot to delete to speed up successive calls to statuses_to_delete

* Add service to cleanup a given account's statuses within a budget

* Add worker to go through account policies and delete old toots

* Fix last inspected status id logic

All existing statuses older or equal to last inspected status id must be
kept by the current policy. This is an invariant that must be kept so that
resuming deletion from the last inspected status remains sound.

* Add tests

* Refactor scheduler and add tests

* Add user interface

* Add support for discriminating based on boosts/favs

* Add UI support for min_reblogs and min_favs, rework UI

* Address first round of review comments

* Replace Snowflake#id_at_start with with_random parameter

* Add tests

* Add tests for StatusesCleanupController

* Rework settings page

* Adjust load-avoiding mechanisms

* Please CodeClimate
3 years ago