Commit Graph

75 Commits (81aec0f74d89559041d291b5e2dc7640556edc6c)

Author SHA1 Message Date
Claire 85792cc375
Fix incorrect notification settings migration for non-followers (#33348) 1 week ago
Jesse Karmani db749c7d2b
Fix down clause for notification policy v2 migrations (#33340) 1 week ago
Matt Jankowski 708919ee93
Update deprecated `enum` style in older migrations (#32925) 2 weeks ago
Claire fbcd14ff7e
Always remove setting keys in legacy user settings migrations (#33196) 3 weeks ago
Eugen Rochko d29eddc401
Fix tag trend migration failing due to duplicate rows (#33189) 3 weeks ago
Matt Jankowski 17c02c9210
Remove `thing_type` and `thing_id` columns from settings table (#31971) 3 weeks ago
Eugen Rochko 48ea7552dd
Change hashtag trends to be stored in the database instead of redis (#32837)
Co-authored-by: David Roetzel <david@roetzel.de>
3 weeks ago
Matt Jankowski f180880f65
Remove postgres version support check for `REINDEX` in migration (#32744) 2 months ago
Claire 62a39d60ce
Fix rolling updates by moving DropEndToEndMessageTables to post-deployment migrations (#31963) 3 months ago
Claire cbdd8edf68
Revamp notification policy options (#31343) 5 months ago
David Roetzel 35a437a03f
Destroy `NotificationRequest`s that are dismissed (#31008) 6 months ago
Emelia Smith e02d23b549
Change `read:me` scope to `profile` scope (#30357)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
7 months ago
Claire 2bcbeed951
Add some error handling to OTP secret migration (#30344) 7 months ago
Matt Jankowski 1e7d5d2957
Update `devise-two-factor` to version 5.0.0 (#28325)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
8 months ago
Claire de740dfb9c
Use `upsert_all` and `insert_all` to reduce back-and-forth in costly migrations (#29752) 9 months ago
Claire 58376eedda
Remove obsolete `admin` and `moderator` columns from `users` table (#29718) 9 months ago
Claire dfa43707eb
Change `AccountRelationshipSeveranceEvent` model to store lost followers and following counts separately (#29714) 9 months ago
Claire 70a8fcf07d
Fix notification policy migration not preserving `filter_private_mentions` correctly (#29699) 9 months ago
Matt Jankowski 245064bb98
Move "everyone" role and "instance actor" account magic number IDs to constants (#29260) 10 months ago
Eugen Rochko fa0ba67753
Change materialized views to be refreshed concurrently to avoid locks (#29015) 11 months ago
Matt Jankowski f0b93ab02f
Use AR `database_version` in PG version checks in migrations (#28804) 11 months ago
Matt Jankowski ea1c0feb86
Remove `add_column_with_default` migration helper (#28654) 12 months ago
Matt Jankowski ae39bed95b
Solve remaining `db/*migrate*` cops (#28579) 12 months ago
Matt Jankowski 51d2b80ff7
Solve `Abc/*` metrics for `db/*migrate*` files (#28568) 12 months ago
Matt Jankowski bcd0171e5e
Fix `Lint/UselessAssignment` cop (#27472) 1 year ago
Claire abcc0b38fa
Fix incorrect PostgreSQL version check (#26979) 1 year ago
Claire cab4cbfa5c
Fix “Scoped order is ignored, it's forced to be batch order.” warnings (#26793) 1 year ago
Claire cddef4c485
Fix language settings for users having selected the `kmr` language (#26787) 1 year ago
Claire 1471be8225
Fix `AddUniqueIndexOnPreviewCardsStatuses` migration requiring PostgreSQL 12+ in some cases (#26737) 1 year ago
Claire ee702e36e5
Change follow recommendation materialized view to be faster in most cases (#26545)
Co-authored-by: Renaud Chaput <renchap@gmail.com>
1 year ago
Claire 8c7f3c5332
Remove old non-unique index on preview_cards statuses join table (#26447) 1 year ago
Matt Jankowski 271d384fd0
Use migration classes in migrations where current definition conflicts with older (#26390) 1 year ago
Claire 4773d7b9aa
Fix `preview_cards_statuses_pkey` not being reindexed concurrently (#26384) 1 year ago
Claire 6b896b20cc
Add primary key to preview_cards_statuses join table (includes deduplication migration) (#25243) 1 year ago
Nick Schonning 1d557305d2
Enable Rubocop Style/FrozenStringLiteralComment (#23793) 1 year ago
Matt Jankowski 60ac9e8634
Fix Rails/SquishedSQLHeredocs cop (#24694) 2 years ago
Claire c0e87ad8ed
Update strong-migrations-enabled migrations from 5.0 and 5.1 to 5.2 (#24275) 2 years ago
Matt Jankowski 3557a65bb2
Reset model in migration after removing column (#24250) 2 years ago
Nick Schonning 717683d1c3
Autofix Rubocop remaining Layout rules (#23679) 2 years ago
Nick Schonning 597767a9f7
Autofix Rubocop Rails/RedundantForeignKey (#23731) 2 years ago
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length (#23632) 2 years ago
Claire 66a70ebb6e
Fix pre-4.0 admin action logs (#22091)
* Fix BackfillAdminActionLogs post-deployment migration

* Improve migration tests

* Backfill admin action logs again
2 years ago
Claire 1dca08b76f
Fix admin action logs page (#19649)
* Add tests

* Fix crash when trying to display orphaned action logs

* Add migration for older admin action logs
2 years ago
Claire cb27d89997
Change migration to migrate admins to Owner role rather than Admin role (#19671) 2 years ago
Claire ff19dad5a0
Fix crash when adding a new filter (#18894)
Fixes #18742
2 years ago
Eugen Rochko 0396acf39e
Add audit log entries for user roles (#19040)
* Refactor audit log schema

* Add audit log entries for user roles
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 e34dd3644c
Remove unused `filtered_languages` column (#18533)
* Remove unused `filtered_languages` column

Fixes #18522

* Fix tests
3 years ago
Eugen Rochko f6d35ed57d
Remove IP matching from e-mail domain blocks (#18190)
Clear out e-mail domain blocks created from automatically resolved DNS records
3 years ago