Commit Graph

157 Commits (395f17ca17b27f9e722425a4d76ef1b02bcebea8)

Author SHA1 Message Date
Emelia Smith 4655be0da6
Fix add validation to webpush subscription keys ()
Matt Jankowski 4d047b95ae
Use more direct attribute handling in `User` fabricator ()
Claire 89f89d738f
Revert "Allow unblocking email addresses from any matching account ()" ()
Matt Jankowski 576554b19b
Use fabrication sequence in domain values ()
Matt Jankowski 34f293475e
Fix results/query in `api/v1/featured_tags/suggestions` ()
Claire 44bf7b8128
Add notifications of severed relationships ()
Claire 8a1423a474
Allow unblocking email addresses from any matching account ()
Matt Jankowski 98ef38e34e
Ensure unique values in fabricators ()
Eugen Rochko 50b17f7e10
Add notification policies and notification requests ()
Matt Jankowski 14c65180df
Use sequence in `software_update` fabricator to allow multiple ()
Matt Jankowski cd37048439
Move followable_by coverage to suggestions ()
Matt Jankowski af366f65ee
Add spec coverage for `models/form/custom_emoji_batch` class ()
Matt Jankowski 28e1a7a394
Improve spec coverage for `models/announcement` class ()
Matt Jankowski e48ecd2929
Remove `default_scope` from `Admin::ActionLog` ()
Matt Jankowski 9a01a260a0
Convert `api/v1/scheduled_statuses` controller spec to request spec ()
Matt Jankowski 155fb84141
Improve spec coverage for collection of `workers/` classes ()
Matt Jankowski 63c9102f8a
Fix `RSpec/MessageChain` cop ()
Matt Jankowski cfa14ec6d1
Fix `Lint/EmptyBlock` cop ()
Claire 16681e0f20
Add admin notifications for new Mastodon versions ()
Matt Jankowski 2c88364222
Restore console behavior in `test` env ()
Matt Jankowski 7581b1ff96
Profiling tools configuration improvement ()
Claire 1e3b19230a
Add stricter protocol fields validation for accounts ()
Matt Jankowski 07933db788
Add coverage for `CLI::Cache` command ()
Daniel M Brasil 4301d8cbb3
Migrate to request specs in `/api/v1/admin/domain_allows` ()
Matt Jankowski 3a2a15c6ea
Use `build` where possible in fabricators ()
Daniel M Brasil b473df9a14
Improve test coverage for `/api/v1/featured_tags` ()
Daniel M Brasil 4a22e72b9b
Improve test coverage for `/api/v1/admin/canonical_email_blocks` ()
Matt Jankowski 604e1c2b11
Remove usage of random sample values in specs ()
Claire 32a030dd74
Rewrite import feature ()
Matt Jankowski 36eeb70d53
Spec coverage on Settings/ controllers specs ()
Matt Jankowski 56bddfbfa3
Serializers spec coverage ()
Matt Jankowski 2d1ccb3d8b
Restore missing fabricators ()
Matt Jankowski cd99fa8ceb
Fabricator specs ()
Matt Jankowski f9c2213ae5
Models specs coverage ()
Stanislav Dobrovolschii d9271126ce
Add rspecs for FollowRecommendationsScheduler ()
Nick Schonning 8fd3fc404d
Autofix Rubocop Rails/RootPathnameMethods ()
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs ()
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals ()
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length ()
Claire 13a2abacc8
Add `roles` attribute to Account entities in REST API ()
pea-sys c68e6b52d9
png optimization(loss less) ()
Eugen Rochko 45ebdb72ca
Add support for language preferences for trending statuses and links ()
Eugen Rochko 5c9abdeff1
Add retention policy for cached content and media ()
Claire 50487db122
Add ability to filter individual posts ()
* 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
Claire 461239db5d
Fix backend compatibility with OpenSSL 3.0 ()
* Update webpush to fork with OpenSSL 3 compatibility

* Fix tests with OpenSSL 3.0

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

* Various fixes and improvements

* Add migration for old settings and fix tootctl role management
Claire 02851848e9
Revamp post filtering system ()
* 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.
Claire 327eed0076
Fix suspicious sign-in mails never being sent ()
* Add tests

* Fix suspicious sign-in mails never being sent
Eugen Rochko a2871cd747
Add administrative webhooks ()
* Add administrative webhooks

* Fix error when webhook is deleted before delivery worker runs