Commit Graph

191 Commits (7d2cd7195bfc53a3bf2b57359fcfcb570813fe3d)

Author SHA1 Message Date
Claire 890e334703
Add migration tests for negative settings ()
jsgoldstein 4d9186a48c
Add search tests ()
Claire cddef4c485
Fix language settings for users having selected the `kmr` language ()
Claire 16681e0f20
Add admin notifications for new Mastodon versions ()
Claire 3a8370e1f4
Fix `repo:changelog` task matching strings that are not Pull Request identifiers ()
Claire 6b896b20cc
Add primary key to preview_cards_statuses join table (includes deduplication migration) ()
Matt Jankowski 30f5ec7303
Rubocop fix: `Perfomance/UnfreezeString` ()
Renaud Chaput 4d1b67f664
Add end-to-end (system) tests ()
Matt Jankowski b8b2470cf8
Fix `Style/SlicingWithRange` cop ()
Nick Schonning 1d557305d2
Enable Rubocop Style/FrozenStringLiteralComment ()
Claire 71d44949bf
Fix branding:generate_app_icons failing because of disallowed ICO coder ()
Nick Schonning c66250abf1
Autofix Rubocop Regex Style rules ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Claire 1d588d58f1
Improve various queries against account domains ()
Nick Schonning 99e2e9b81f
Fix minor typos in comments and spec names ()
Matt Jankowski 60ac9e8634
Fix Rails/SquishedSQLHeredocs cop ()
Eugen Rochko a9b5598c97
Change user settings to be stored in a more optimal way ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Claire 0d70deee53
Add migration tests for user mail notification settings ()
Nick Schonning 25d36b6edd
Autofix Rubocop Style/RedundantArgument ()
Nick Schonning e762a14c0a
Enable Rubocop Performance/DeleteSuffix ()
Nick Schonning 8fd3fc404d
Autofix Rubocop Rails/RootPathnameMethods ()
Nick Schonning 59c8d43d94
Autofix Rubocop Style/RescueStandardError ()
Nick Schonning 717683d1c3
Autofix Rubocop remaining Layout rules ()
Nick Schonning bf785df9fe
Audofix Rubocop Style/WordArray ()
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals ()
Nick Schonning 2177daeae9
Autofix Rubocop Style/RedundantBegin ()
Nick Schonning d65b2c1924
Apply Rubocop Style/RedundantConstantBase ()
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length ()
Nick Schonning 11557d1c5a
Apply Rubocop Rails/RootPublicPath ()
Nick Schonning f68bb52556
Apply Rubocop Style/NegatedIfElseCondition ()
JT Olio a5fd2fe1cb
Add Storj DCS to cloud object storage options ()
* Add Storj DCS to cloud object storage options

More explanation here: https://forum.storj.io/t/object-storage-provider-for-mastodon-instance/11464/37

* more help for which command to use
Claire a3a5aa1597
Fix incorrect env file generation in mastodon:setup ()
Regression from 
Claire a65f86ae55
Fix `$` not being escaped in `.env.production` file generated by `mastodon:setup` ()
* Fix `$` not being escaped in `.env.production` file generated by `mastodon:setup`

* Improve robustness of dotenv escaping
Dan Peterson 3d3429243f
Fix default S3_HOSTNAME used in mastodon:setup ()
s3-us-east-1.amazonaws.com does not exist.

Co-authored-by: Effy Elden <effy@effy.space>
Claire 66a70ebb6e
Fix pre-4.0 admin action logs ()
* Fix BackfillAdminActionLogs post-deployment migration

* Improve migration tests

* Backfill admin action logs again
Arthur Isac 1af482659d
Copied Spaces support from packer .rake ()
Yamagishi Kazutoshi 19a8563905
Fix `ENV` ()
F 9feba112a7
Make enable_starttls configurable by envvars ()
ENABLE_STARTTLS is designed to replace ENABLE_STARTTLS_AUTO by accepting
three values: 'auto' (the default), 'always', and 'never'. If
ENABLE_STARTTLS isn't provided, we fall back to ENABLE_STARTTLS_AUTO. In
this way, this change should be fully backwards compatible.

Resolves 
Eugen Rochko e02812d5b6
Add assets from Twemoji 14.0 ()
Claire 1dca08b76f
Fix admin action logs page ()
* Add tests

* Fix crash when trying to display orphaned action logs

* Add migration for older admin action logs
Claire e91418436a
Fix mastodon:setup not setting the admin's role properly ()
* Fix mastodon:setup not setting the admin's role properly

* Set contact username when creating admin account in mastodon:setup
luzpaz 4aa3b9bd01
Fix typos ()
* Fix typos

Found via `codespell -q 3 -S ./CHANGELOG.md,./AUTHORS.md,./config/locales,./app/javascript/mastodon/locales -L ba,keypair,medias,pixelx,ro`

* Follow-up typo fix
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.
Eugen Rochko fe2d6fe105
Fix wrong aspect ratio of logo in icons ()
Eugen Rochko 45aa5781ce
Change brand color and logotypes ()
- Add rake task for generating Apple/Android icons and favicons from SVG
- Add rake task for generating PNG icons and logos for e-mails from SVG
- Remove obsolete Microsoft icons and configuration
- Remove PWA shortcut icons
Claire f714e24ff1
Fix redis configuration not being changed by mastodon:setup ()
Fixes 
Gaelan Steele 74e20f22cd
Fix light-mode emoji borders. ()
Claire 33cd80d69c
Fix instance actor being incorrectly created when running migrations ()
* Add migration test about instance actor key

* Fix old migration

* Work around incorrect database state
Eugen Rochko 75e33fd08f
Fix null values being included in some indexes ()
* Fix null values being included in some indexes

* Update lib/mastodon/migration_helpers.rb

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Add documentation link to corruption error message

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Claire 61ae6b3535
Add more migration tests ()
* Add migration tests for hide_network settings migration

* Add tests about suspended/suspended_at

* Add more tests regarding the results of migrations

* Fix migration test regarding stale conflicting remote account

* Add migration tests about AccountConversation
Eugen Rochko b6d7726ecb
Remove language detection through cld3 ()
* Remove language detection through cld3

* Update app/helpers/languages_helper.rb

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>