Commit Graph

149 Commits (main)

Author SHA1 Message Date
Jeremy Kescher 3df2bc2caf
v4.3.0-alpha.0+glitch+cat+1.0.6 4 months ago
Matt Jankowski cd37048439
Move followable_by coverage to suggestions (#28697) 4 months ago
Essem 6ae86f40d1
Add support for emoji reactions
Squashed, modified, and rebased from glitch-soc/mastodon#2221.

Co-authored-by: fef <owo@fef.moe>
Co-authored-by: Jeremy Kescher <jeremy@kescher.at>
Co-authored-by: neatchee <neatchee@gmail.com>
Co-authored-by: Ivan Rodriguez <104603218+IRod22@users.noreply.github.com>
Co-authored-by: Plastikmensch <plastikmensch@users.noreply.github.com>
5 months ago
Matt Jankowski af366f65ee
Add spec coverage for `models/form/custom_emoji_batch` class (#28388) 5 months ago
Matt Jankowski 28e1a7a394
Improve spec coverage for `models/announcement` class (#28350) 5 months ago
Matt Jankowski e48ecd2929
Remove `default_scope` from `Admin::ActionLog` (#28026) 6 months ago
Matt Jankowski 9a01a260a0
Convert `api/v1/scheduled_statuses` controller spec to request spec (#27986) 6 months ago
Matt Jankowski 155fb84141
Improve spec coverage for collection of `workers/` classes (#27874) 6 months ago
Matt Jankowski 63c9102f8a
Fix `RSpec/MessageChain` cop (#27776) 6 months ago
Matt Jankowski cfa14ec6d1
Fix `Lint/EmptyBlock` cop (#27748) 6 months ago
Claire 16681e0f20
Add admin notifications for new Mastodon versions (#26582) 9 months ago
Matt Jankowski 2c88364222
Restore console behavior in `test` env (#26401) 9 months ago
Matt Jankowski 7581b1ff96
Profiling tools configuration improvement (#25383) 10 months ago
Claire 1e3b19230a
Add stricter protocol fields validation for accounts (#25937) 10 months ago
Matt Jankowski 07933db788
Add coverage for `CLI::Cache` command (#25238) 11 months ago
Daniel M Brasil 4301d8cbb3
Migrate to request specs in `/api/v1/admin/domain_allows` (#25333) 11 months ago
Matt Jankowski 3a2a15c6ea
Use `build` where possible in fabricators (#25360) 11 months ago
Daniel M Brasil b473df9a14
Improve test coverage for `/api/v1/featured_tags` (#25076) 1 year ago
Daniel M Brasil 4a22e72b9b
Improve test coverage for `/api/v1/admin/canonical_email_blocks` (#24985) 1 year ago
Matt Jankowski 604e1c2b11
Remove usage of random sample values in specs (#24869) 1 year ago
Claire 32a030dd74
Rewrite import feature (#21054) 1 year ago
Matt Jankowski 36eeb70d53
Spec coverage on Settings/ controllers specs (#24221) 1 year ago
Matt Jankowski 56bddfbfa3
Serializers spec coverage (#24017) 1 year ago
Matt Jankowski 2d1ccb3d8b
Restore missing fabricators (#23951) 1 year ago
Matt Jankowski cd99fa8ceb
Fabricator specs (#23925) 1 year ago
Matt Jankowski f9c2213ae5
Models specs coverage (#23940) 1 year ago
Stanislav Dobrovolschii d9271126ce
Add rspecs for FollowRecommendationsScheduler (#23890) 1 year ago
Nick Schonning 8fd3fc404d
Autofix Rubocop Rails/RootPathnameMethods (#23760) 1 year ago
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs (#23790) 1 year ago
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals (#23695) 1 year ago
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length (#23632) 1 year ago
Claire 13a2abacc8
Add `roles` attribute to Account entities in REST API (#23255) 1 year 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
2 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.
2 years ago
Claire 327eed0076
Fix suspicious sign-in mails never being sent (#18599)
* Add tests

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

* Fix error when webhook is deleted before delivery worker runs
2 years ago
Eugen Rochko 02b8d63fce
Fix report category not being saved in REST API (#17682) 2 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
2 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.
2 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
2 years ago
Eugen Rochko 14f436c457
Add notifications for statuses deleted by moderators (#17204) 2 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
Eugen Rochko d174d12c83
Add authentication history (#16408) 3 years ago