Commit Graph

516 Commits (6be2b59cd364fe629235ae038d1b51d3c4dd87f9)

Author SHA1 Message Date
Eugen Rochko 50b17f7e10
Add notification policies and notification requests (#29366) 10 months ago
Matt Jankowski 245064bb98
Move "everyone" role and "instance actor" account magic number IDs to constants (#29260) 10 months ago
Matt Jankowski 1e0b0a3486
Use SQL heredoc on long statement lines in migrations (#29112) 11 months ago
Matt Jankowski dedefdc303
Move length value mapping to constant in ids to bigints migration (#29048) 11 months ago
Matt Jankowski 0bec5c0755
Remove migration base class switcher from `RailsSettingsMigration` (#29047) 11 months ago
Eugen Rochko fa0ba67753
Change materialized views to be refreshed concurrently to avoid locks (#29015) 11 months ago
Eugen Rochko 5b1eb09d54
Add annual reports for accounts (#28693) 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
gunchleoc 173953c23e
Fix ISO code for Canadian French (#26015)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
12 months ago
Matt Jankowski ae39bed95b
Solve remaining `db/*migrate*` cops (#28579) 12 months ago
Claire dfdadb92e8
Add ability to require approval when users sign up using specific email domains (#28468) 12 months ago
Matt Jankowski 51d2b80ff7
Solve `Abc/*` metrics for `db/*migrate*` files (#28568) 12 months ago
Eugen Rochko b5ac61b2c5
Change algorithm of follow recommendations (#28314)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Matt Jankowski 3e336fe706
Opt out of `Rails/SkipsModelValidations` cop in db/migrate (#28371) 1 year ago
Matt Jankowski 469ee2ae36
Fix `Style/HashEachMethods` cop (#28173) 1 year ago
Eugen Rochko 0d14fcebae
Change link previews to keep original URL from the status (#27312) 1 year ago
Matt Jankowski c501d626e8
Fix `Rails/BulkChangeTable` cop (#26890) 1 year ago
Matt Jankowski bcd0171e5e
Fix `Lint/UselessAssignment` cop (#27472) 1 year ago
Matt Jankowski a1b27d8b61
Fix `Naming/VariableNumber` cop (#27447) 1 year ago
Claire 890e334703
Add migration tests for negative settings (#27012) 1 year ago
Claire abcc0b38fa
Fix incorrect PostgreSQL version check (#26979) 1 year ago
Claire 81caafbe84
Fix performances of profile directory (#26842) 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 16681e0f20
Add admin notifications for new Mastodon versions (#26582) 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 90ec88d58b
Add support for `indexable` attribute on remote actors (#26485)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.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
Christian Schmidt 8da99ffb0d
Add alt text for preview card thumbnails (#26184) 1 year ago
Claire 6b896b20cc
Add primary key to preview_cards_statuses join table (includes deduplication migration) (#25243) 1 year ago
Claire 425d77f812
Fix crash in `tootctl status remove` and some old migrations (#26210) 1 year ago
Matt Jankowski a2dca50ef3
Use heredoc SQL blocks in `AddFromAccountIdToNotifications` migration (#26178) 1 year ago
Eugen Rochko 7bd8ef355c
Add `published_at` attribute to preview cards (#26153) 1 year ago
Christian Schmidt 3abe0fc5c8
Use valid email address for first account (#26114) 1 year ago
Matt Jankowski ce43ed144c
Rails 7.0 update (#25668) 1 year ago
Matt Jankowski b8b2470cf8
Fix `Style/SlicingWithRange` cop (#25923) 1 year ago
Nick Schonning 1d557305d2
Enable Rubocop Style/FrozenStringLiteralComment (#23793) 1 year ago
Claire 12fa24a885
Fix forgotten unconfirmed_email migration file (#25702) 2 years ago
Claire e6a8faae81
Add users index on unconfirmed_email (#25672) 2 years ago
Claire 933ba1a3eb
Add superapp index on `oauth_applications` (#25670) 2 years ago
Eugen Rochko ba06a2f104
Revert "Rails 7 update" (#25667) 2 years ago
Matt Jankowski 50c2a03695
Rails 7 update (#24241) 2 years ago
Matt Jankowski c47cdf6e17
Add index to backups on `user_id` column (#25647) 2 years ago
Eugen Rochko 4c9406bdb0
Add time zone preference (#25342) 2 years ago
Claire f378f10404
Fix compatibility of recent migration with PostgreSQL 10 (#25324) 2 years ago
Eugen Rochko 4eda233e09
Add webhook templating (#23289)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Darius Kazemi bacb674921
Add exclusive lists (#22048)
Co-authored-by: Liam Cooke <liam@liamcooke.com>
Co-authored-by: John Holdun <john@johnholdun.com>
Co-authored-by: Effy Elden <effy@effy.space>
Co-authored-by: Lina Reyne <git@lina.pizza>
Co-authored-by: Lina <20880695+necropolina@users.noreply.github.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Claire fe84f7e323
Add missing primary keys to `accounts_tags` and `statuses_tags` (#25210) 2 years ago
Claire 1d588d58f1
Improve various queries against account domains (#25126) 2 years ago
Matt Jankowski 9f5deb310b
Fix Performance/MapCompact cop (#24797)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Claire 6693a4fe7c
Change lists to be able to include accounts with pending follow requests (#19727) 2 years ago
Claire 32a030dd74
Rewrite import feature (#21054) 2 years ago
Eugen Rochko 0ad2413b35
Fix n+1 query in settings migration (#24783) 2 years ago
Eugen Rochko f1c1fa1411
Fix transaction around settings migration (#24761) 2 years ago
Matt Jankowski 60ac9e8634
Fix Rails/SquishedSQLHeredocs cop (#24694) 2 years ago
Nick Schonning 49fad26eca
Drop EOL Ruby 2.7 (#24237) 2 years ago
Claire 369f239f7b
Fix user settings migration script failing in some cases (#24453) 2 years ago
Eugen Rochko a9b5598c97
Change user settings to be stored in a more optimal way (#23630)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Robert R George 782669a042
Wrap db:setup with Chewy.strategy(:mastodon) (#24302) 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
Matt Jankowski b9e34ef098
Migration warning helper, and only run in production env (#24253) 2 years ago
Jean byroot Boussier 922837dc96
Upgrade to latest redis-rb 4.x and fix deprecations (#23616)
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2 years ago
Nick Schonning 717683d1c3
Autofix Rubocop remaining Layout rules (#23679) 2 years ago
Nick Schonning bf785df9fe
Audofix Rubocop Style/WordArray (#23739) 2 years ago
Nick Schonning 597767a9f7
Autofix Rubocop Rails/RedundantForeignKey (#23731) 2 years ago
Nick Schonning 8ef09813a2
Autofix Rubocop Style/EmptyMethod (#23732) 2 years ago
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals (#23695) 2 years ago
Nick Schonning 2177daeae9
Autofix Rubocop Style/RedundantBegin (#23703) 2 years ago
Nick Schonning 167709f6b0
Autofix Rubocop Style/BlockDelimiters (#23706) 2 years ago
Nick Schonning ac59d6f19f
Enable Rubocop Style/NumericLiterals (#23647) 2 years ago
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length (#23632) 2 years ago
Nick Schonning 593bb8ce99
Autofix Rubocop Style/RaiseArgs (#23650) 2 years ago
Claire d1387579b9
Fix situations in which instance actor can be set to a Mastodon-incompatible name (#22307)
* Validate internal actor

* Use “internal.actor” by default for the server actor username

* Fix instance actor username on the fly if it includes ':'

* Change actor name from internal.actor to mastodon.internal
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
Eugen Rochko b1a219552e
Fix featured tags not saving preferred casing (#19732) 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
Eugen Rochko 487d81fb92
Fix IP blocks not having a unique index (#19456) 2 years ago
Takeshi Umeda 53e86747e4
Fix duplicate featured tags (#19403)
* Fix duplicate featured tags

* Add unique tag name validator

* Fix error message
2 years ago
Eugen Rochko b04633a961
Add image processing and generate blurhash for server thumbnail (#19348)
Remove separate server hero setting
2 years ago
Jeremy Kescher 5f79200a5e
Remove/update old "tootsuite" references, except those needed for Docker (#19327) 2 years ago
Eugen Rochko 45ebdb72ca
Add support for language preferences for trending statuses and links (#18288) 2 years ago
Eugen Rochko 50948b46aa
Add ability to filter followed accounts' posts by language (#19095) 2 years ago
Eugen Rochko c556c3a0d1
Add admin API for managing canonical e-mail blocks (#19067) 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
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
Eugen Rochko c3f0621a59
Add ability to follow hashtags (#18809) 2 years ago
Eugen Rochko e7aa2be828
Change how hashtags are normalized (#18795)
* Change how hashtags are normalized

* Fix tests
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
Eugen Rochko a2871cd747
Add administrative webhooks (#18510)
* Add administrative webhooks

* Fix error when webhook is deleted before delivery worker runs
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
Claire 9b4024a389
Add some missing indexes on foreign keys (#18157) 3 years ago