about summary refs log tree commit diff
path: root/lib/tasks
AgeCommit message (Collapse)Author
2023-04-09Fix most rubocop issues (#2165)Claire
* Run rubocop --autocorrect on app/, config/ and lib/, also manually fix some remaining style issues * Run rubocop --autocorrect-all on db/ * Run rubocop --autocorrect-all on `spec/` and fix remaining issues
2023-03-31Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `README.md`: Upstream added a link to the roadmap, but we have a completely different README. Kept ours. - `app/models/media_attachment.rb`: Upstream upped media attachment limits. Updated the default according to upstream's. - `db/migrate/20180831171112_create_bookmarks.rb`: Upstream changed the migration compatibility level. Did so too. - `config/initializers/content_security_policy.rb`: Upstream refactored this file but we have a different version. Kept our version. - `app/controllers/settings/preferences_controller.rb`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. The file does not directly references individual settings anymore. Applied upstream changes. - `app/lib/user_settings_decorator.rb`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. The file got removed entirely. Removed it as well. - `app/models/user.rb`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. References to individual settings have been removed from the file. Removed them as well. - `app/views/settings/preferences/appearance/show.html.haml`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. Applied upstream's changes and ported ours back. - `app/views/settings/preferences/notifications/show.html.haml`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. Applied upstream's changes and ported ours back. - `app/views/settings/preferences/other/show.html.haml`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. Applied upstream's changes and ported ours back. - `config/settings.yml`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. In particular, upstream removed user-specific and unused settings. Did the same in glitch-soc. - `spec/controllers/application_controller_spec.rb`: Conflicts due to glitch-soc's theming system. Mostly kept our version, as upstream messed up the tests.
2023-03-30Change user settings to be stored in a more optimal way (#23630)Eugen Rochko
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2023-03-27Add migration tests for user mail notification settings (#24277)Claire
2023-03-16Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `README.md`: Upstream changed their README, we have our own. Kept ours. - `app/helpers/application_helper.rb`: Minor code style fix upstream, on a line that is different in glitch-soc due to the different theming system. Applied the code style fix to our own code. - `app/views/settings/preferences/appearance/show.html.haml`: Code style fix on a line next to lines exclusive to glitch-soc. Applied upstream changes. - `yarn.lock`: Upstream updated a dependency textually close to a glitch-soc-only dependency. Updated the dependency like upstream did.
2023-03-16Autofix Rubocop Style/RedundantArgument (#23798)Nick Schonning
2023-03-15Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `.github/workflows/build-image.yml`: Upstream switched to pushing to both DockerHub and GitHub Container Repository, while glitch-soc was already pushing to the latter only. Updated our configuration to be slightly more consistent with upstream's naming and styling, but kept our behavior. - `Gemfile.lock`: Updated dependencies textually too close to glitch-soc only hcaptcha dependency. Updated dependencies as upstream did. - `README.md`: Upstream updated its README, but we have a completely different one. Kept our README, though it probably should be reworked at some point. - `app/views/auth/sessions/two_factor.html.haml`: Minor style fix upstream that's on a line glitch-soc removed because of its different theming system. Kept our file as is. - `spec/controllers/health_controller_spec.rb`: This file apparently did not exist upstream, upstream created it with different contents but it is functionally the same. Switched to upstream's version of the file. - `spec/presenters/instance_presenter_spec.rb`: Upstream changed the specs around `GITHUB_REPOSITORY`, while glitch-soc had its own code because it's a fork and does not have the same default source URL. Took upstream's change, but with glitch-soc's repo as the default case. - `yarn.lock`: Upstream dependencies textually too close to a glitch-soc only one. Updated dependencies as upstream did.
2023-03-13Enable Rubocop Performance/DeleteSuffix (#24077)Nick Schonning
2023-02-25Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `.prettierignore`: Upstream added a line at the end of the file, while glitch-soc had its own extra lines. Took upstream's change. - `CONTRIBUTING.md`: We have our custom CONTRIBUTING.md quoting upstream. Upstream made changes. Ported upstream changes. - `app/controllers/application_controller.rb`: Upstream made code style changes in a method that is entirely replaced in glitch-soc. Ignored the change. - `app/models/account.rb`: Code style changes textually close to glitch-soc-specific changes. Ported upstream changes. - `lib/sanitize_ext/sanitize_config.rb`: Upstream code style changes. Ignored them.
2023-02-22Autofix Rubocop Rails/RootPathnameMethods (#23760)Nick Schonning
2023-02-20Autofix Rubocop Style/RescueStandardError (#23745)Nick Schonning
2023-02-20Autofix Rubocop remaining Layout rules (#23679)Nick Schonning
2023-02-20Audofix Rubocop Style/WordArray (#23739)Nick Schonning
2023-02-19Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `.github/dependabot.yml`: Upstream made changes while we have dropped this file. Keep the file deleted. - `.prettierignore`: Upstream made changes at the end of the file, where we had our extra lines. Just moved our extra lines back at the end. - `app/serializers/initial_state_serializer.rb`: Upstream code style changes. Applied them. - `app/services/backup_service.rb`: Upstream code style changes. Applied them.
2023-02-19Autofix Rubocop Style/StringLiterals (#23695)Nick Schonning
2023-02-19Autofix Rubocop Style/RedundantBegin (#23703)Nick Schonning
2023-02-18Apply Rubocop Style/RedundantConstantBase (#23463)Nick Schonning
2023-02-18Run rubocop formatting except line length (#23632)Nick Schonning
2023-02-09Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `README.md`: Minor upstream change, our README is completely different. Kept ours. - `lib/tasks/assets.rake`: glitch-soc has extra code to deal with its theming system, upstream changed a line that exists in glitch-soc. Applied upstream changes.
2023-02-08Apply Rubocop Rails/RootPublicPath (#23447)Nick Schonning
2023-02-08Apply Rubocop Style/NegatedIfElseCondition (#23451)Nick Schonning
2023-01-21Merge branch 'main' into glitch-soc/merge-upstreamClaire
2023-01-18Add Storj DCS to cloud object storage options (#21929)JT Olio
* 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
2023-01-13Merge branch 'main' into glitch-soc/merge-upstreamClaire
2023-01-13Fix incorrect env file generation in mastodon:setup (#23072)Claire
Regression from #23012
2023-01-12Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/models/status.rb`: Minor upstream refactor moved hook definitions around, and glitch-soc has an extra `before_create`. Moved the `before_create` accordingly. - `app/services/batched_remove_status_service.rb`: Minor upstream refactor changed a block in which glitch-soc had one extra call to handle direct timelines. Adapted changes to keep glitch-soc's extra call.
2023-01-11Fix `$` not being escaped in `.env.production` file generated by ↵Claire
`mastodon:setup` (#23012) * Fix `$` not being escaped in `.env.production` file generated by `mastodon:setup` * Improve robustness of dotenv escaping
2022-12-15Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `README.md`: Discarded upstream changes: we have our own README - `app/controllers/follower_accounts_controller.rb`: Port upstream's minor refactoring
2022-12-15Fix default S3_HOSTNAME used in mastodon:setup (#19932)Dan Peterson
s3-us-east-1.amazonaws.com does not exist. Co-authored-by: Effy Elden <effy@effy.space>
2022-12-07Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/models/concerns/domain_materializable.rb`: Fixed a code style issue upstream in a PR that got merged in glitch-soc earlier. Changed the code to match upstream's.
2022-12-06Fix pre-4.0 admin action logs (#22091)Claire
* Fix BackfillAdminActionLogs post-deployment migration * Improve migration tests * Backfill admin action logs again
2022-11-14Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/views/admin/announcements/edit.html.haml`: Upstream change too close to theming-related glitch-soc change. Ported upstream changes. - `app/views/admin/announcements/new.html.haml` Upstream change too close to theming-related glitch-soc change. Ported upstream changes.
2022-11-13Copied Spaces support from packer .rake (#20573)Arthur Isac
2022-11-12Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/models/account.rb`: Conflict because we (glitch-soc) have disabled trending of posts without review. Discarded that upstream change. - `app/views/admin/settings/discovery/show.html.haml`: Just an extra setting in glitch-soc. Kept that extra setting.
2022-11-11Fix `ENV` (#20377)Yamagishi Kazutoshi
2022-11-10Make enable_starttls configurable by envvars (#20321)F
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 #20311
2022-11-06Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/javascript/mastodon/features/compose/components/poll_form.js`: glitch-soc change because of having changed the default number of available poll options. Applied upstream's changes while keeping glitch-soc's default number of poll options. - `public/oops.png`: We had a minor graphics change, probably not worth diverging from upstream. Took upstream version.
2022-11-04Add assets from Twemoji 14.0 (#19733)Eugen Rochko
2022-11-03Fix admin action logs page (#19649)Claire
* Add tests * Fix crash when trying to display orphaned action logs * Add migration for older admin action logs
2022-11-02Fix mastodon:setup not setting the admin's role properly (#19670)Claire
* Fix mastodon:setup not setting the admin's role properly * Set contact username when creating admin account in mastodon:setup
2022-10-02Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/controllers/home_controller.rb`: Upstream made it so `/web` is available to non-logged-in users and `/` redirects to `/web` instead of `/about`. Kept our version since glitch-soc's WebUI doesn't have what's needed yet and I think /about is still a much better landing page anyway. - `app/models/form/admin_settings.rb`: Upstream added new settings, and glitch-soc had an extra setting. Not really a conflict. Added upstream's new settings. - `app/serializers/initial_state_serializer.rb`: Upstream added a new `server` initial state object. Not really a conflict. Merged upstream's changes. - `app/views/admin/settings/edit.html.haml`: Upstream added new settings. Not really a conflict. Merged upstream's changes. - `app/workers/scheduler/feed_cleanup_scheduler.rb`: Upstream refactored that part and removed the file. Ported our relevant changes into `app/lib/vacuum/feeds_vacuum.rb` - `config/settings.yml`: Upstream added new settings. Not a real conflict. Added upstream's new settings.
2022-08-28Fix typos (#18604)luzpaz
* 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
2022-06-28Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `.github/workflows/build-image.yml`: Fix erroneous deletion in a previous merge. - `Gemfile`: Conflict caused by glitch-soc-only hCaptcha dependency - `app/controllers/auth/sessions_controller.rb`: Minor conflict due to glitch-soc's theming system. - `app/controllers/filters_controller.rb`: Minor conflict due to glitch-soc's theming system. - `app/serializers/rest/status_serializer.rb`: Minor conflict due to glitch-soc having an extra `local_only` property
2022-06-28Revamp post filtering system (#18058)Claire
* 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.
2022-06-21Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `.github/dependabot.yml`: Changed upstream, while we modified it in glitch-soc to not get spammed by dependabot. Kept it removed. - `README.md`: Changed upstream, which has a very different version. Discarded upstream changes.
2022-06-11Fix wrong aspect ratio of logo in icons (#18639)Eugen Rochko
2022-06-11Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `README.md`: Our README is completely different. Discarded upstream changes. - `app/javascript/packs/mailer.js`: We had removed the file. Move the changes to `app/javascript/core/mailer.js`.
2022-06-09Change brand color and logotypes (#18592)Eugen Rochko
- 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
2022-05-11Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `package.json`: Not really a conflict, upstream updated a dependency textually adjacent to a glitch-soc-only one. Updated the dependency as upstream did.
2022-05-09Fix redis configuration not being changed by mastodon:setup (#18383)Claire
Fixes #18342