Commit graph

1339 commits

Author SHA1 Message Date
Jeremy Kescher 7318b74ebf
Merge remote-tracking branch 'upstream/main' into develop
# Conflicts:
#	Gemfile.lock
#	app/models/notification.rb
#	config/locales/simple_form.de.yml
2023-03-05 12:34:16 +01:00
Claire 4ed09276d5 Merge branch 'main' into glitch-soc/merge-upstream
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-25 14:00:40 +01:00
Nick Schonning 4ff44be134
Autofix Rubocop Rails/Blank (#23765) 2023-02-22 09:57:56 +09:00
Nick Schonning 0cfdd1a401
Enable Rubocop Style/StringConcatenation defaults (#23792) 2023-02-22 09:54:36 +09:00
Jeremy Kescher 0e634397c3
Merge remote-tracking branch 'upstream/main' into develop
# Conflicts:
#	.github/workflows/build-image.yml
#	Gemfile.lock
2023-02-21 00:40:08 +01:00
Nick Schonning 59c8d43d94
Autofix Rubocop Style/RescueStandardError (#23745) 2023-02-20 11:01:20 +01:00
Nick Schonning 717683d1c3
Autofix Rubocop remaining Layout rules (#23679) 2023-02-20 06:58:28 +01:00
Claire 7452a95998 Merge branch 'main' into glitch-soc/merge-upstream
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-19 10:42:55 +01:00
Nick Schonning 2177daeae9
Autofix Rubocop Style/RedundantBegin (#23703) 2023-02-19 07:09:40 +09:00
Jeremy Kescher 4a6cc45f9d
Merge remote-tracking branch 'upstream/main' into develop
# Conflicts:
#	Gemfile
#	Gemfile.lock
#	config/sidekiq.yml
2023-02-18 22:38:53 +01:00
Nick Schonning e2a3ebb271
Autofix Rubocop Style/IfUnlessModifier (#23697) 2023-02-18 12:37:47 +01:00
Nick Schonning 634368c491
Autofix Rubocop Lint/SymbolConversion (#23683) 2023-02-18 03:23:49 +01:00
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length (#23632) 2023-02-18 06:56:20 +09:00
Jeremy Kescher 8de39432a9
Merge remote-tracking branch 'upstream/main' into develop
# Conflicts:
#	.github/workflows/build-image.yml
#	Gemfile.lock
#	app/javascript/flavours/glitch/actions/interactions.js
#	config/initializers/rack_attack.rb
#	config/locales/en_GB.yml
2023-02-17 00:26:21 +01:00
Claire ce84d163cc Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `.prettierignore`:
  Upstream added a line at the end, glitch-soc had extra entries at the end.
  Added upstream's new line before glitch-soc's.
- `Gemfile.lock`:
  Upstream updated dependencies while glitch-soc has an extra one (hcaptcha).
  Updated dependencies like upstream did.
- `app/controllers/api/v1/statuses_controller.rb`:
  Not a real conflict, upstream added a parameter (`allowed_mentions`) where
  glitch-soc already had an extra one (`content_type`).
  Added upstream's new parameter.
- `app/javascript/styles/fonts/roboto-mono.scss`:
  A lot of lines were changed upstream due to code style changes, and a lot
  of those lines had path changes to accomodate glitch-soc's theming system.
  Applied upstream's style changes.
- `app/javascript/styles/fonts/roboto.scss`:
  A lot of lines were changed upstream due to code style changes, and a lot
  of those lines had path changes to accomodate glitch-soc's theming system.
  Applied upstream's style changes.
2023-02-13 19:35:35 +01:00
Claire d6930b3847
Add API parameter to safeguard unexpect mentions in new posts (#18350) 2023-02-13 16:36:29 +01:00
Claire 87419f9307 Merge branch 'main' into glitch-soc/merge-upstream 2023-02-10 22:49:59 +01:00
Claire 0c9eac80d8
Fix unbounded recursion in post discovery (#23506)
* Add a limit to how many posts can get fetched as a result of a single request

* Add tests

* Always pass `request_id` when processing `Announce` activities

---------

Co-authored-by: nametoolong <nametoolong@users.noreply.github.com>
2023-02-10 22:16:37 +01:00
Claire 85558a5e18 Merge branch 'main' into glitch-soc/merge-upstream
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-09 12:46:12 +01:00
Nick Schonning f68bb52556
Apply Rubocop Style/NegatedIfElseCondition (#23451) 2023-02-08 07:07:36 +01:00
Nick Schonning ed570050c6
Autofix Rails/EagerEvaluationLogMessage (#23429)
* Autofix Rails/EagerEvaluationLogMessage

* Update spec for debug block syntax
2023-02-07 03:44:36 +01:00
Claire bb89f0af8a
Fix ActivityPub::ProcessingWorker error on incoming malformed JSON-LD (#23416) 2023-02-06 21:00:58 +01:00
Jeremy Kescher 855b0d4dbb
Merge remote-tracking branch 'upstream/main' into develop
# Conflicts:
#	.github/workflows/build-image.yml
#	lib/mastodon/version.rb
2023-01-26 17:27:01 +01:00
Claire 3074338d79 Merge branch 'main' into glitch-soc/merge-upstream 2023-01-24 20:32:31 +01:00
Markus Unterwaditzer f2a6e71bb6
Suppress AddressFamilyError in link verification (#23204)
* Suppress AddressFamilyError

* clarify comment
2023-01-23 13:05:54 +01:00
Jeremy Kescher bd30ddd982
Merge remote-tracking branch 'upstream/main' into develop 2023-01-22 11:33:25 +01:00
Claire 3c76f1f6c2 Merge branch 'main' into glitch-soc/merge-upstream 2023-01-21 19:42:58 +01:00
Claire 628dcbb732
Revert "Remove LDSignature on actor Delete activities (#21466)" (#23185)
This reverts commit f4f2b062ec.
2023-01-21 15:33:21 +01:00
Jeremy Kescher 0d829dadea
Merge remote-tracking branch 'upstream/main' into develop
# Conflicts:
#	Gemfile.lock
#	app/javascript/flavours/glitch/features/ui/index.js
#	app/javascript/mastodon/features/ui/index.js
2023-01-18 22:29:27 +01:00
Claire 60abcb3c4c Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `config/i18n-tasks.yml`:
  Upstream added new ignored strings, glitch-soc has extra ignored strings
  because of the theming system.
  Added upstream's changes.
2023-01-18 17:38:11 +01:00
Claire 68dcbcb7bf
Add more specific error messages to HTTP signature verification (#21617)
* Return specific error on failure to parse Date header

* Add error message when preferredUsername is not set

* Change error report to be JSON and include more details

* Change error report to differentiate unknown account and failed refresh

* Add tests
2023-01-18 16:47:56 +01:00
Claire 4b92e59f4f
Add support for editing media description and focus point of already-posted statuses (#20878)
* Add backend support for editing media attachments of existing posts

* Allow editing media attachments of already-posted toots

* Add tests
2023-01-18 16:33:55 +01:00
Jeremy Kescher 004b2fc290
Merge remote-tracking branch 'upstream/main' into develop 2023-01-15 20:38:42 +01:00
Claire 3e63fcd4f0 Merge branch 'main' into glitch-soc/merge-upstream
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-12 10:15:46 +01:00
Markus Unterwaditzer 0c689b9d01
fix: allow verification when page size exceeds 1MB (using HTML5 parser) (#22879)
* fix: allow verification when page size exceeds 1MB
Truncates the page after 1MB instead

Closes #15316

* switch to HTML5 parser, fix rubocop errors

* undo rubocop fixes

Co-authored-by: Chris Zubak-Skees <chriszs@gmail.com>
2023-01-11 21:59:13 +01:00
Kaspar V ae62e5fa53
Fix/remove calling private method with send in model (#22951)
* fix(status): remove send usage for private unlink_from_conversations

- make unlink_from_conversations public method
- rename unlink_from_conversations to unlink_from_conversations!
- fix send call on private method in statuses_vacuum and batched_remove_status_service

* fix(feeds_vacuum): replace find_in_batches with in_batches

because active record query results should be a little more efficient than
itterating with map and each. Postgres can grasp such lists of ids much quicker
than ruby can.
Will probably make allmost no difference, but cannot hurt either.
2023-01-11 21:57:24 +01:00
Jeremy Kescher 48373a71e3
Merge remote-tracking branch 'upstream/main' into develop
# Conflicts:
#	Gemfile.lock
#	app/javascript/flavours/glitch/components/status_action_bar.js
#	app/javascript/flavours/glitch/containers/status_container.js
#	app/javascript/flavours/glitch/features/status/components/action_bar.js
#	app/javascript/flavours/glitch/locales/de.json
#	app/javascript/flavours/glitch/locales/fr.json
#	app/javascript/mastodon/components/status_action_bar.js
#	app/javascript/mastodon/features/status/components/action_bar.js
#	config/locales-glitch/de.yml
#	config/locales-glitch/fr.yml
#	config/locales-glitch/simple_form.de.yml
#	config/locales-glitch/simple_form.fr.yml
2023-01-05 23:29:53 +01:00
Claire 6c20dad201 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `README.md`:
  Upstream updated its README, while we have a completely different one.
  Kept our README.
- `app/controllers/concerns/web_app_controller_concern.rb`:
  Conflict because of glitch-soc's theming system.
  Additionally, glitch-soc has different behavior regarding moved accounts.
  Ported some of the changes, but kept our overall behavior.
- `app/javascript/packs/admin.js`:
  Code changes actually applied to `app/javascript/core/admin.js`
2023-01-05 14:16:25 +01:00
Claire 18fb01ef7c
Fix possible race conditions when suspending/unsuspending accounts (#22363)
* Fix possible race conditions when suspending/unsuspending accounts

* Fix tests

Tests were assuming SuspensionWorker and UnsuspensionWorker would do the
suspending/unsuspending themselves, but this has changed.
2023-01-05 13:47:21 +01:00
Effy Elden 4dc9152b3e
Be more lenient with OEmbed detection and validation (#22533) 2023-01-05 13:36:24 +01:00
Jeremy Kescher 1661561640
Merge branch 'reactions' into develop
# Conflicts:
#	Gemfile.lock
#	app/javascript/flavours/glitch/locales/de.js
#	app/javascript/flavours/glitch/locales/en.js
#	app/javascript/flavours/glitch/locales/es.js
#	app/javascript/flavours/glitch/locales/fr.js
#	app/javascript/flavours/glitch/locales/ja.js
#	app/javascript/flavours/glitch/locales/ko.js
#	app/javascript/flavours/glitch/locales/pl.js
#	app/javascript/flavours/glitch/locales/zh-CN.js
#	app/javascript/mastodon/actions/interactions.js
#	app/javascript/mastodon/locales/fr.json
#	db/migrate/20221124114030_create_status_reactions.rb
2022-12-22 00:18:36 +01:00
Jeremy Kescher 2379efb52f
Merge remote-tracking branch 'upstream/main' into reactions
# Conflicts:
#	app/javascript/flavours/glitch/locales/de.js
#	app/javascript/flavours/glitch/locales/en.js
#	app/javascript/flavours/glitch/locales/fr.js
#	app/javascript/mastodon/actions/interactions.js
#	app/javascript/mastodon/locales/fr.json
#	config/locales-glitch/de.yml
#	config/locales-glitch/fr.yml
#	config/locales-glitch/simple_form.de.yml
#	config/locales-glitch/simple_form.fr.yml
2022-12-21 23:45:28 +01:00
Claire b248aa4d3e Merge branch 'main' into glitch-soc/merge-upstream 2022-12-21 15:59:39 +01:00
fef f4faa1b511
fix reaction deletion bug and clean up controller
Turns out the strange error where it would delete
the wrong reaction occurred because I forgot to
pass the emoji name to the query, which resulted
in the database deleting the first reaction it
found.  Also, this removes the unused set_reaction
callback and includes the Authorization module for
the status reactions controller.
2022-12-20 18:27:52 +01:00
fef 89a8c21f80
cleanup backend emoji reaction code 2022-12-20 18:24:20 +01:00
fef 19491d2032
cherry-pick emoji reaction changes 2022-12-20 18:23:55 +01:00
fef 738433e46a
make frontend fetch reaction limit
the maximum number of reactions was previously
hardcoded to 8.  this commit also fixes an
incorrect query in StatusReactionValidator where
it didn't count per-user reactions but the total
amount of different ones.
2022-12-20 18:22:05 +01:00
fef cc71e734c4
federate emoji reactions
this is kind of experimental, but it should work
in theory.  at least i tested it with a remove
akkoma instance and it didn't crash.
2022-12-20 18:22:05 +01:00
Claire c1de673060
Fix suspension worker crashing on S3-compatible setups without ACL support (#22487) 2022-12-19 17:55:17 +01:00
Jeremy Kescher 0406f173cf
Merge remote-tracking branch 'reactions/main' into develop
# Conflicts:
#	app/javascript/flavours/glitch/locales/de.js
2022-12-17 11:09:32 +01:00