Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream changes up to cfa71a4d16e71b04a42dda564ed8e188bd1badd9 #2647

Merged
merged 222 commits into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
222 commits
Select commit Hold shift + click to select a range
881e8c1
Refactor: fix streaming postgresql and redis typing issues (#28747)
ThisIsMissEm Jan 25, 2024
0e0a94f
Handle CLI failure exit status at the top-level script (#28322)
mjankowski Jan 26, 2024
4528704
New Crowdin Translations (automated) (#28923)
github-actions[bot] Jan 26, 2024
805dba7
Change compose form to use server-provided post character limit (#28928)
ClearlyClaire Jan 26, 2024
9cc1817
Fix intmermittent failure in `api/v1/accounts/statuses` controller sp…
mjankowski Jan 26, 2024
2f86563
Combine double subjects in `admin/accounts` controller spec (#28936)
mjankowski Jan 26, 2024
6d35a77
Combine repeated subjects in `models/user` spec (#28937)
mjankowski Jan 26, 2024
beaef4b
Combine double subjects in application controller shared example (#28…
mjankowski Jan 26, 2024
beb74fd
Combine double subjects in instance actors controller shared example …
mjankowski Jan 26, 2024
685eaa0
Combine double subject in admin/statuses controller shared example (#…
mjankowski Jan 26, 2024
1a30a51
Combine repeated subjects in link details extractor spec (#28941)
mjankowski Jan 26, 2024
5fbdb20
Combine repeated `subject` in `cli/accounts` spec shared example (#28…
mjankowski Jan 26, 2024
09a3493
Combine double subject in `api/v1/media` shared example (#28943)
mjankowski Jan 26, 2024
d791bca
Combine double subject in `well_known/webfinger` shared example (#28944)
mjankowski Jan 26, 2024
e519f11
Combine repeated subject in `cacheable response` shared example (#28945)
mjankowski Jan 26, 2024
160c8f4
Update babel monorepo to v7.23.9 (#28916)
renovate[bot] Jan 26, 2024
f4a12ad
Update dependency axios to v1.6.7 (#28917)
renovate[bot] Jan 26, 2024
87ad398
Update formatjs monorepo (#28925)
renovate[bot] Jan 26, 2024
0b0ca6f
Move `api/v1/timelines/list` to request spec (#28948)
mjankowski Jan 26, 2024
7adcc0a
Move `api/v1/trends/*` to request specs (#28949)
mjankowski Jan 26, 2024
b6baab4
Move `api/v2/admin/accounts` to request spec (#28950)
mjankowski Jan 26, 2024
5119fbc
Move `api/v1/admin/trends/links/preview_card_providers` to request sp…
mjankowski Jan 26, 2024
239244e
Combine repeated subject in ap fetch remote account service spec (#28…
mjankowski Jan 26, 2024
44f6d28
Combine repeated subject in ap fetch remote actor service spec (#28953)
mjankowski Jan 26, 2024
ff8937a
Move `api/v1/statuses/*` to request spec (#28954)
mjankowski Jan 26, 2024
1467f1e
Fixed the toggle emoji dropdown bug (#29012)
jh97uk Jan 30, 2024
adcd693
Use existing `MediaAttachment.remote` scope in media CLI (#28912)
mjankowski Jan 30, 2024
9d38303
Update dependency immutable to v4.3.5 (#28933)
renovate[bot] Jan 30, 2024
f91acba
Combine repeated requests in account controller concern spec (#28957)
mjankowski Jan 30, 2024
b3075a9
Remove unused l18n messages (#28964)
ykzts Jan 30, 2024
86fbde7
Fix `Style/NumericLiterals` cop in ProfileStories support module (#28…
mjankowski Jan 30, 2024
ce0d134
Add `redirect_with_vary` to `AllowedMethods` for `Style/FormatStringT…
mjankowski Jan 30, 2024
8c08e5c
Update devDependencies (non-major) (#29000)
renovate[bot] Jan 30, 2024
0bc526a
Update eslint (non-major) (#29001)
renovate[bot] Jan 30, 2024
0c0d077
Update dependency chewy to v7.5.1 (#29018)
renovate[bot] Jan 30, 2024
c4af668
Fix follow recommendations for less used languages (#29017)
Gargron Jan 30, 2024
fa0ba67
Change materialized views to be refreshed concurrently to avoid locks…
Gargron Jan 30, 2024
022d2a3
Make factory gems available in test+development envs (#28969)
mjankowski Jan 31, 2024
738dba0
Update dependency capybara to v3.40.0 (#28966)
renovate[bot] Jan 31, 2024
dd934eb
Update `actions/cache` to v4 (updates node 16->20) (#29025)
mjankowski Jan 31, 2024
812a131
Add github action workflow for manual security builds (#29040)
ClearlyClaire Feb 1, 2024
8b7b0ee
Configure selenium to use Chrome version 120 (#29038)
mjankowski Feb 1, 2024
7316a08
Fix missing `workflow_dispatch` trigger for `build-security` (#29041)
ClearlyClaire Feb 1, 2024
9cdc60e
Change onboarding prompt to follow suggestions carousel in web UI (#2…
Gargron Feb 1, 2024
1726085
Merge pull request from GHSA-3fjr-858r-92rw
ClearlyClaire Feb 1, 2024
3c315a6
Fix 'focus the compose textarea' shortcut is not working (#29059)
eai04191 Feb 2, 2024
1666b19
Fix confirmation e-mails when signing up through an app (#29064)
Gargron Feb 2, 2024
86500e3
Extract scenic view model common methods to concern (#28111)
mjankowski Feb 6, 2024
f00ba02
Update dependency nokogiri to v1.16.2 [SECURITY] (#29106)
renovate[bot] Feb 6, 2024
916aeb5
Update DefinitelyTyped types (non-major) (#29088)
renovate[bot] Feb 6, 2024
586b4fa
Update dependency haml_lint to v0.56.0 (#29082)
renovate[bot] Feb 6, 2024
5ca4540
Update `nsa` gem to version 0.3.0 (#29065)
mjankowski Feb 6, 2024
a2d8aa1
Update dependency tzinfo-data to v1.2024.1 (#29052)
renovate[bot] Feb 6, 2024
779d987
Update `codedoc/codecov-action` to v4 (#29036)
mjankowski Feb 6, 2024
66dda7c
Fix already-invalid reports failing to resolve (#29027)
ClearlyClaire Feb 6, 2024
9ce914c
Fix report reason selector in moderation interface not unselecting ru…
ClearlyClaire Feb 6, 2024
90f4b8d
Update dependency postcss to v8.4.34 (#29103)
renovate[bot] Feb 6, 2024
62028b1
Update libretranslate/libretranslate Docker tag to v1.5.5 (#29090)
renovate[bot] Feb 6, 2024
0bec5c0
Remove migration base class switcher from `RailsSettingsMigration` (#…
mjankowski Feb 6, 2024
a31427a
Update dependency pino to v8.18.0 (#29043)
renovate[bot] Feb 6, 2024
4cf07ed
Add missing action logging to `api/v1/admin/reports#update` (#29044)
mjankowski Feb 6, 2024
dedefdc
Move length value mapping to constant in ids to bigints migration (#2…
mjankowski Feb 6, 2024
4fb7f61
Return domain block digests from admin domain blocks API (#29092)
ThisIsMissEm Feb 6, 2024
df7acdc
Update markers API spec for error case (#29096)
mjankowski Feb 6, 2024
577520b
Replace deprecated `Sidekiq::Testing` block style (#29097)
mjankowski Feb 6, 2024
e8cc989
Update dependency bootsnap to '~> 1.18.0' (#29019)
renovate[bot] Feb 6, 2024
0877f6f
Remove redundant `return` in `IntentsController` (#29099)
mjankowski Feb 6, 2024
978fdc7
Reduce expectation count in example from `ProcessAccountService` spec…
mjankowski Feb 6, 2024
2d6ab44
Reduce request/response round-trips in ap/collections controller spec…
mjankowski Feb 6, 2024
69e61ff
Move direct serializer usage out of admin view partial (#29028)
mjankowski Feb 6, 2024
cf42eba
Update dependency brakeman to v6.1.2 (#29062)
renovate[bot] Feb 6, 2024
93a5b3f
Move status serializer chooser to private method (#29030)
mjankowski Feb 6, 2024
0df86d7
Reduce `RSpec/ExampleLength` in PostStatusService spec example (#29105)
mjankowski Feb 6, 2024
2f19ddd
Move status serializer error handling to private method (#29031)
mjankowski Feb 6, 2024
64300e0
Fix self-destruct schedule not actually replacing initial schedule (#…
ClearlyClaire Feb 6, 2024
1e0b0a3
Use SQL heredoc on long statement lines in migrations (#29112)
mjankowski Feb 6, 2024
7ee93b7
Change `source` attribute of `Suggestion` entity in `/api/v2/suggesti…
ClearlyClaire Feb 6, 2024
90ccf7b
New Crowdin Translations (automated) (#28965)
github-actions[bot] Feb 6, 2024
aaa58d4
Fix tagging of manual security nightly builds (#29061)
ClearlyClaire Feb 6, 2024
492e25d
Update dependency webmock to v3.20.0 (#29120)
renovate[bot] Feb 7, 2024
da50217
Combine repeated requests in `admin/accounts` controller spec (#29119)
mjankowski Feb 7, 2024
eeabf9a
Fix compatibility with Redis <6.2 (#29123)
ClearlyClaire Feb 7, 2024
2912829
Add support for specifying custom CA cert for Elasticsearch (#29122)
ClearlyClaire Feb 7, 2024
1705271
New Crowdin Translations (automated) (#29121)
github-actions[bot] Feb 7, 2024
7efc33b
Move HTTP Signature parsing code to its own class (#28932)
ClearlyClaire Feb 7, 2024
b2133fe
Update artifact preservation to use `save_path` value (#29035)
mjankowski Feb 7, 2024
dbafec8
Update dependency @reduxjs/toolkit to v2.1.0 (#28879)
renovate[bot] Feb 7, 2024
95da28d
Add common `ThreadingHelper` module for specs (#29116)
mjankowski Feb 7, 2024
79b4b94
Configure `CountAsOne` value for `RSpec/ExampleLength` cop (#29115)
mjankowski Feb 7, 2024
eff447a
Rewrite signature verification using regexps and `StringScanner` (#29…
ClearlyClaire Feb 7, 2024
2a362d6
New Crowdin Translations (automated) (#29145)
github-actions[bot] Feb 8, 2024
52986f3
Update dependency postcss to v8.4.35 (#29136)
renovate[bot] Feb 8, 2024
5271131
Extract helper method for repeated form fill in admin/domain_blocks f…
mjankowski Feb 8, 2024
15437e4
Add `context` and `before` to lengthy tag manager spec examples (#29129)
mjankowski Feb 8, 2024
13840d6
Update dependency irb to v1.11.2 (#29135)
renovate[bot] Feb 8, 2024
d4db1c4
Update dependency pghero to v3.4.1 (#29144)
renovate[bot] Feb 8, 2024
67ec192
Clean up some unused CSS definitions (#29146)
ClearlyClaire Feb 8, 2024
a9e91eb
Add common stub setup for resolv dns in email mx validator spec (#29140)
mjankowski Feb 8, 2024
ca8fbda
Add end-to-end test for OCR in media uploads (#29148)
ClearlyClaire Feb 8, 2024
c07028b
New Crowdin Translations (automated) (#29152)
github-actions[bot] Feb 9, 2024
8125dae
Rename `ES_CA_CERT` to `ES_CA_FILE` for consistency (#29147)
ClearlyClaire Feb 12, 2024
6482948
New Crowdin Translations (automated) (#29156)
github-actions[bot] Feb 12, 2024
5891884
Update peter-evans/create-pull-request action to v6 (#29167)
renovate[bot] Feb 12, 2024
cf0d6be
Update eslint (non-major) (#29166)
renovate[bot] Feb 12, 2024
819ede1
Update dependency dotenv to v16.4.2 (#29157)
renovate[bot] Feb 12, 2024
b244e5c
Update dependency sidekiq-unique-jobs to v7.1.33 (#29175)
renovate[bot] Feb 13, 2024
e25d9df
Update dependency dotenv to v16.4.3 (#29174)
renovate[bot] Feb 13, 2024
5de1ce2
New Crowdin Translations (automated) (#29182)
github-actions[bot] Feb 13, 2024
476a043
Fix modal container bounds (#29185)
nico3333fr Feb 13, 2024
e8b66a0
Ignore legacy moderator and admin columns on User model (#29188)
ThisIsMissEm Feb 13, 2024
46142cd
Disable administrative doorkeeper routes (#29187)
ThisIsMissEm Feb 13, 2024
554e2a0
Add `sidekiq_unique_jobs:delete_all_locks` task and disable `sidekiq-…
ClearlyClaire Feb 14, 2024
68eaa80
Merge pull request from GHSA-7w3c-p9j8-mq3x
ThisIsMissEm Feb 14, 2024
b31af34
Merge pull request from GHSA-vm39-j3vx-pch3
ClearlyClaire Feb 14, 2024
8e8e0f1
Bump version to v4.3.0-alpha.2 (#29200)
ClearlyClaire Feb 14, 2024
bbbbf00
Fix OmniAuth tests (#29201)
ClearlyClaire Feb 14, 2024
844aa59
Doc update about ruby version 3.0+ (#29202)
mjankowski Feb 14, 2024
d4d0565
Fix user creation failure handling in OAuth paths (#29207)
ClearlyClaire Feb 14, 2024
fc4f823
Avoid local block var assignment in ap/process_status_update_service …
mjankowski Feb 16, 2024
1df2ffc
Use `subject` in blacklist email validator spec (#29211)
mjankowski Feb 16, 2024
ed49392
Reduce `RSpec/MultipleExpectations` in ap/activity/create spec (#29224)
mjankowski Feb 16, 2024
1c93d62
New Crowdin Translations (automated) (#29195)
github-actions[bot] Feb 16, 2024
4b7f04e
Reduce `RSpec/MultipleExpectations` in post_status_service spec (#29225)
mjankowski Feb 16, 2024
a9f9b00
Reduce `RSpec/MultipleExpectations` in captcha feature spec (#29226)
mjankowski Feb 16, 2024
a8ee6fd
Update dependency pg to v1.5.5 (#29230)
renovate[bot] Feb 16, 2024
9fee5e8
Merge pull request from GHSA-jhrq-qvrm-qr36
ClearlyClaire Feb 16, 2024
5f21a1f
Bump version to v4.3.0-alpha.3 (#29241)
ClearlyClaire Feb 16, 2024
e140d05
Update dependency doorkeeper to v5.6.9 (#29196)
renovate[bot] Feb 16, 2024
bba488c
Reduce `RSpec/MultipleExpectations` in media_attachment spec (#29228)
mjankowski Feb 16, 2024
1690fb3
Reduce `RSpec/MultipleExpectations` in instance_actors_controller spe…
mjankowski Feb 16, 2024
117b507
Extract `subject` from `User#mark_email_as_confirmed!` spec (#29231)
mjankowski Feb 16, 2024
a316c0e
Reduce round trips in disputes/appeals spec (#29232)
mjankowski Feb 16, 2024
3454fcb
Reduce round trips in auth/sessions spec (#29233)
mjankowski Feb 16, 2024
1946e17
Reduce round trips in admin/disputes/appeals spec (#29234)
mjankowski Feb 16, 2024
1d9d14b
Use `abort` instead of `warn(); exit` in boot.rb env check (#29209)
mjankowski Feb 16, 2024
cfadb87
Update enum syntax to use the new Rails 7.0 style (#29217)
hendrixfan Feb 16, 2024
96ddf1d
Fix flaky end-to-end OCR test (#29244)
ClearlyClaire Feb 16, 2024
245064b
Move "everyone" role and "instance actor" account magic number IDs to…
mjankowski Feb 19, 2024
63f4ea0
Change follow suggestions design in web UI (#29272)
Gargron Feb 19, 2024
fe6c055
Update dependency eslint-plugin-jsdoc to v48.1.0 (#29275)
renovate[bot] Feb 19, 2024
ad16362
New Crowdin Translations (automated) (#29255)
github-actions[bot] Feb 19, 2024
c645490
Fix `sensitive` flag not being removed when removing CW in new compos…
hinaloe Feb 19, 2024
72b0c9e
Re-enable fixed `Style/Semicolon` cop (#29212)
mjankowski Feb 19, 2024
86627ea
Add a missing thread example to the statuses spec (#29278)
hendrixfan Feb 19, 2024
64f9939
Use `capture_emails` helper to improve email assertions in specs (#29…
mjankowski Feb 19, 2024
b8b2f20
Change explore icon from hashtag to compass in web UI (#29294)
Gargron Feb 20, 2024
6e4c1e1
Update dependency webmock to v3.21.2 (#29290)
renovate[bot] Feb 20, 2024
5d9d0d1
Update dependency selenium-webdriver to v4.18.1 (#29287)
renovate[bot] Feb 20, 2024
785e2f9
Add scope `providing_styles` to `UserRole` (#29286)
mjankowski Feb 20, 2024
bde4df6
Remove CSS definitions for some unused classes (#29279)
ClearlyClaire Feb 20, 2024
e1cee84
Update dependency cocoon-js-vanilla to v1.4.0 (#29293)
renovate[bot] Feb 20, 2024
0ef44ee
Move `AccountSuggestions::Source` subclasses default limit value to c…
mjankowski Feb 20, 2024
9a2b9d1
New Crowdin Translations (automated) (#29298)
github-actions[bot] Feb 20, 2024
937dad1
Extract ES query and filter hashes into private methods in `TagSearch…
mjankowski Feb 20, 2024
36fd47a
Remove unused dependencies (#29289)
wojtekmaj Feb 20, 2024
fd2b6c2
New Crowdin Translations (automated) (#29311)
github-actions[bot] Feb 21, 2024
1f648fd
Remove erroneous service type on `TagFeed` model spec (#29302)
mjankowski Feb 21, 2024
5f19e7e
Add basic coverage for `ProcessHashtagsService` class (#29320)
mjankowski Feb 21, 2024
b739324
Add basic coverage for `CreateFeaturedTagService` class (#29321)
mjankowski Feb 21, 2024
8f61e32
Add basic coverage for `AppealService` class (#29322)
mjankowski Feb 21, 2024
08342ad
Add basic coverage for `AfterUnallowDomainService` class (#29324)
mjankowski Feb 21, 2024
2751acb
Automatically switch from open to approved registrations in absence o…
ClearlyClaire Feb 21, 2024
581f14e
Update yarn to version 4.1.0 (#29339)
mjankowski Feb 21, 2024
d48d824
Update DefinitelyTyped types (non-major) (#29165)
renovate[bot] Feb 21, 2024
38d0292
Update dependency @reduxjs/toolkit to v2.2.1 (#29178)
renovate[bot] Feb 21, 2024
df4ed60
Update dependency dotenv to v16.4.5 (#29190)
renovate[bot] Feb 21, 2024
bcc0860
Update dependency core-js to v3.36.0 (#29197)
renovate[bot] Feb 21, 2024
aed60df
Update dependency sass to v1.71.1 (#29238)
renovate[bot] Feb 21, 2024
638861b
Update dependency http-link-header to v1.1.2 (#29340)
renovate[bot] Feb 21, 2024
c63567a
Update typescript-eslint monorepo to v7 (major) (#29179)
renovate[bot] Feb 21, 2024
006aa4e
Update husky and remove deprecated features (#29338)
mjankowski Feb 22, 2024
53a4648
Update dependency pino to v8.19.0 (#29253)
renovate[bot] Feb 22, 2024
449fcf1
New Crowdin Translations (automated) (#29343)
github-actions[bot] Feb 22, 2024
96d5c44
Update dependency rails to v7.1.3.2 (#29342)
renovate[bot] Feb 22, 2024
fa1c3a0
Update dependency rack to v2.2.8.1 (#29341)
renovate[bot] Feb 22, 2024
ab2ef63
Add basic coverage for `VoteService` class (#29334)
mjankowski Feb 22, 2024
d1602c0
Add basic coverage for `ApproveAppealService` class (#29333)
mjankowski Feb 22, 2024
a69fe53
Add basic coverage for `WebhookService` class (#29331)
mjankowski Feb 22, 2024
f70905f
Add basic coverage for `UnmuteService` class (#29330)
mjankowski Feb 22, 2024
6342ddd
Add basic coverage for `UnfavouriteService` class (#29329)
mjankowski Feb 22, 2024
7c7dfe7
Add basic coverage for `RemoveFeaturedTagService` class (#29328)
mjankowski Feb 22, 2024
e9b0f0c
Add basic coverage for `RemoveDomainsFromFollowersService` class (#29…
mjankowski Feb 22, 2024
ebe2086
Update dependency haml_lint to v0.57.0 (#29181)
renovate[bot] Feb 22, 2024
491dd97
Streaming: refactor to custom Error classes (#28632)
ThisIsMissEm Feb 22, 2024
b719048
Change registrations to be disabled by default for new servers (#29280)
ClearlyClaire Feb 22, 2024
a949688
Fix auto-close email being sent to users with devops permissions inst…
ClearlyClaire Feb 22, 2024
5152dd8
Fix link verifications when page size exceeds 1MB (#29358)
ClearlyClaire Feb 22, 2024
a6ed148
Use heredoc on the `HTML` blocks in verify link spec (#29365)
mjankowski Feb 22, 2024
9d8dfeb
Fix processing of `Link` objects in `Image` objects (#29335)
ClearlyClaire Feb 22, 2024
82e2370
Update dependency cssnano to v6.0.4 (#29367)
renovate[bot] Feb 22, 2024
45f71e3
Update `@rails/ujs` to version 7.1.3-2 (#29359)
mjankowski Feb 22, 2024
baa2373
Update dependency webmock to v3.22.0 (#29313)
renovate[bot] Feb 23, 2024
b0064dd
Add basic coverage for `MoveService` class (#29301)
mjankowski Feb 23, 2024
bba4118
New Crowdin Translations (automated) (#29369)
github-actions[bot] Feb 23, 2024
25ffe0a
Fix pixel alignment for some composer icons (#29372)
ClearlyClaire Feb 23, 2024
cfa71a4
Fix admin account created by `mastodon:setup` not being auto-approved…
ClearlyClaire Feb 23, 2024
20615a5
Merge commit '805dba7f8d2a2d5f910ec1396247b36417170345' into glitch-s…
ClearlyClaire Feb 24, 2024
6da6996
[Glitch] Change compose form to use server-provided post character limit
ClearlyClaire Jan 26, 2024
47b5105
Remove `max_toot_chars` from initial-state
ClearlyClaire Feb 24, 2024
c297d99
Merge commit '87ad398ddc78f2da5746774960690661e8e57335' into glitch-s…
ClearlyClaire Feb 24, 2024
9903e6b
Merge commit '0b0ca6f3b85c9d08e4642e49d743f8d060632293' into glitch-s…
ClearlyClaire Feb 24, 2024
73de363
Move `api/v1/timelines/direct` to request spec
ClearlyClaire Feb 24, 2024
dfd74f0
Merge commit '1467f1e1e1c18dc4b310862ff1f719165a24cfb6' into glitch-s…
ClearlyClaire Feb 24, 2024
4d6844e
[Glitch] Fixed the toggle emoji dropdown bug
jh97uk Jan 30, 2024
5b9ddfc
Merge commit 'fa0ba677538588086d83c97c0ea56f9cd1556590' into glitch-s…
ClearlyClaire Feb 24, 2024
b4cca47
[Glitch] Remove unused l18n messages
ykzts Jan 30, 2024
ab2f0da
Merge commit 'aaa58d4807377e04649499ebee91757b16b9a007' into glitch-s…
ClearlyClaire Feb 24, 2024
cce3f3d
[Glitch] Change onboarding prompt to follow suggestions carousel in w…
Gargron Feb 1, 2024
3894674
[Glitch] Fix 'focus the compose textarea' shortcut is not working
eai04191 Feb 2, 2024
3c36e1b
[Glitch] Fix report reason selector in moderation interface not unsel…
ClearlyClaire Feb 6, 2024
ef3d155
Merge commit 'c645490d553124d800d30488595f7d2d9d61584d' into glitch-s…
ClearlyClaire Feb 24, 2024
9f0ff2b
[Glitch] Clean up some unused CSS definitions
ClearlyClaire Feb 8, 2024
e45f40d
[Glitch] Fix modal container bounds
nico3333fr Feb 13, 2024
26924a0
[Glitch] Change `source` attribute of `Suggestion` entity in `/api/v2…
ClearlyClaire Feb 6, 2024
200e11a
[Glitch] Change follow suggestions design in web UI
Gargron Feb 19, 2024
ba67ea3
[Glitch] Fix `sensitive` flag not being removed when removing CW in n…
hinaloe Feb 19, 2024
d2cfc6e
Merge commit '08342ad40c1b92caf873282190efe8533a7d6e2e' into glitch-s…
ClearlyClaire Feb 24, 2024
7901dc9
Merge commit '491dd9764244c8adf37861f00d916c96bdbfdaf8' into glitch-s…
ClearlyClaire Feb 24, 2024
1ad91de
Merge commit '9d8dfeb5fbbc274482489a3ac9f22dd736da156c' into glitch-s…
ClearlyClaire Feb 24, 2024
2dc2447
Merge commit 'cfa71a4d16e71b04a42dda564ed8e188bd1badd9' into glitch-s…
ClearlyClaire Feb 24, 2024
ad0be12
[Glitch] Fix pixel alignment for some composer icons
ClearlyClaire Feb 23, 2024
3ffb81e
[Glitch] Add end-to-end test for OCR in media uploads
ClearlyClaire Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ services:
hard: -1

libretranslate:
image: libretranslate/libretranslate:v1.5.4
image: libretranslate/libretranslate:v1.5.5
restart: unless-stopped
volumes:
- lt-data:/home/libretranslate/.local
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-javascript/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
shell: bash
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

# Create or update the pull request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5.0.2
uses: peter-evans/create-pull-request@v6.0.0
with:
commit-message: 'New Crowdin translations'
title: 'New Crowdin Translations (automated)'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:

- name: Upload coverage reports to Codecov
if: matrix.ruby-version == '.ruby-version'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: coverage/lcov/mastodon.lcov

Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
if: failure()
with:
name: e2e-screenshots
path: tmp/screenshots/
path: tmp/capybara/

test-search:
name: Elastic Search integration testing
Expand Down Expand Up @@ -328,4 +328,4 @@ jobs:
if: failure()
with:
name: test-search-screenshots
path: tmp/screenshots/
path: tmp/capybara/
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
26 changes: 14 additions & 12 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@ Rails/FilePath:
Rails/HttpStatus:
EnforcedStyle: numeric

# Reason: Allowed in `tootctl` CLI code and in boot ENV checker
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsexit
Rails/Exit:
Exclude:
- 'config/boot.rb'
- 'lib/mastodon/cli/*.rb'

# Reason: Conflicts with `Lint/UselessMethodDefinition` for inherited controller actions
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railslexicallyscopedactionfilter
Rails/LexicallyScopedActionFilter:
Expand Down Expand Up @@ -135,6 +128,11 @@ Rails/UnusedIgnoredColumns:
Rails/NegateInclude:
Enabled: false

# Reason: Enforce default limit, but allow some elements to span lines
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecexamplelength
RSpec/ExampleLength:
CountAsOne: ['array', 'heredoc', 'method_call']

# Reason: Deprecated cop, will be removed in 3.0, replaced by SpecFilePathFormat
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecfilepath
RSpec/FilePath:
Expand Down Expand Up @@ -175,6 +173,15 @@ Style/ClassAndModuleChildren:
Style/Documentation:
Enabled: false

# Reason: Route redirects are not token-formatted and must be skipped
# https://docs.rubocop.org/rubocop/cops_style.html#styleformatstringtoken
Style/FormatStringToken:
inherit_mode:
merge:
- AllowedMethods # The rubocop-rails config adds `redirect`
AllowedMethods:
- redirect_with_vary

# Reason: Enforce modern Ruby style
# https://docs.rubocop.org/rubocop/cops_style.html#stylehashsyntax
Style/HashSyntax:
Expand Down Expand Up @@ -203,11 +210,6 @@ Style/RedundantBegin:
Style/RescueStandardError:
EnforcedStyle: implicit

# Reason: Simplify some spec layouts
# https://docs.rubocop.org/rubocop/cops_style.html#stylesemicolon
Style/Semicolon:
AllowAsExpressionSeparator: true

# Reason: Originally disabled for CodeClimate, and no config consensus has been found
# https://docs.rubocop.org/rubocop/cops_style.html#stylesymbolarray
Style/SymbolArray:
Expand Down
4 changes: 2 additions & 2 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Metrics/PerceivedComplexity:

# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 22
Max: 20 # Override default of 5

RSpec/MultipleExpectations:
Max: 8
Max: 7

# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Expand Down
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,6 @@ group :test do
# Used to mock environment variables
gem 'climate_control'

# Generating fake data for specs
gem 'faker', '~> 3.2'

# Generate test objects for specs
gem 'fabrication', '~> 2.30'

# Add back helpers functions removed in Rails 5.1
gem 'rails-controller-testing', '~> 1.0'

Expand Down Expand Up @@ -182,6 +176,12 @@ group :development, :test do
# Interactive Debugging tools
gem 'debug', '~> 1.8'

# Generate fake data values
gem 'faker', '~> 3.2'

# Generate factory objects
gem 'fabrication', '~> 2.30'

# Profiling tools
gem 'memory_profiler', require: false
gem 'ruby-prof', require: false
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ GEM
webfinger (1.2.0)
activesupport
httpclient (>= 2.4)
webmock (3.21.2)
webmock (3.22.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand Down
5 changes: 2 additions & 3 deletions app/controllers/activitypub/inboxes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ def process_collection_synchronization
return if raw_params.blank? || ENV['DISABLE_FOLLOWERS_SYNCHRONIZATION'] == 'true' || signed_request_account.nil?

# Re-using the syntax for signature parameters
tree = SignatureParamsParser.new.parse(raw_params)
params = SignatureParamsTransformer.new.apply(tree)
params = SignatureParser.parse(raw_params)

ActivityPub::PrepareFollowersSynchronizationService.new.call(signed_request_account, params)
rescue Parslet::ParseFailed
rescue SignatureParser::ParsingError
Rails.logger.warn 'Error parsing Collection-Synchronization header'
end

Expand Down
1 change: 1 addition & 0 deletions app/controllers/api/v1/admin/reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def show
def update
authorize @report, :update?
@report.update!(report_params)
log_action :update, @report
render json: @report, serializer: REST::Admin::ReportSerializer
end

Expand Down
23 changes: 17 additions & 6 deletions app/controllers/api/v1/statuses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,9 @@ def create
with_rate_limit: true
)

render json: @status, serializer: @status.is_a?(ScheduledStatus) ? REST::ScheduledStatusSerializer : REST::StatusSerializer
render json: @status, serializer: serializer_for_status
rescue PostStatusService::UnexpectedMentionsError => e
unexpected_accounts = ActiveModel::Serializer::CollectionSerializer.new(
e.accounts,
serializer: REST::AccountSerializer
)
render json: { error: e.message, unexpected_accounts: unexpected_accounts }, status: 422
render json: unexpected_accounts_error_json(e), status: 422
end

def update
Expand Down Expand Up @@ -158,6 +154,21 @@ def status_params
)
end

def serializer_for_status
@status.is_a?(ScheduledStatus) ? REST::ScheduledStatusSerializer : REST::StatusSerializer
end

def unexpected_accounts_error_json(error)
{
error: error.message,
unexpected_accounts: serialized_accounts(error.accounts),
}
end

def serialized_accounts(accounts)
ActiveModel::Serializer::CollectionSerializer.new(accounts, serializer: REST::AccountSerializer)
end

def pagination_params(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/auth/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ def on_authentication_failure(user, security_measure, failure_reason)
)

# Only send a notification email every hour at most
return if redis.set("2fa_failure_notification:#{user.id}", '1', ex: 1.hour, get: true).present?
return if redis.get("2fa_failure_notification:#{user.id}").present?

redis.set("2fa_failure_notification:#{user.id}", '1', ex: 1.hour)

UserMailer.failed_2fa(user, request.remote_ip, request.user_agent, Time.now.utc).deliver_later!
end
Expand Down
41 changes: 2 additions & 39 deletions app/controllers/concerns/signature_verification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,6 @@ module SignatureVerification

class SignatureVerificationError < StandardError; end

class SignatureParamsParser < Parslet::Parser
rule(:token) { match("[0-9a-zA-Z!#$%&'*+.^_`|~-]").repeat(1).as(:token) }
rule(:quoted_string) { str('"') >> (qdtext | quoted_pair).repeat.as(:quoted_string) >> str('"') }
# qdtext and quoted_pair are not exactly according to spec but meh
rule(:qdtext) { match('[^\\\\"]') }
rule(:quoted_pair) { str('\\') >> any }
rule(:bws) { match('\s').repeat }
rule(:param) { (token.as(:key) >> bws >> str('=') >> bws >> (token | quoted_string).as(:value)).as(:param) }
rule(:comma) { bws >> str(',') >> bws }
# Old versions of node-http-signature add an incorrect "Signature " prefix to the header
rule(:buggy_prefix) { str('Signature ') }
rule(:params) { buggy_prefix.maybe >> (param >> (comma >> param).repeat).as(:params) }
root(:params)
end

class SignatureParamsTransformer < Parslet::Transform
rule(params: subtree(:param)) do
(param.is_a?(Array) ? param : [param]).each_with_object({}) { |(key, value), hash| hash[key] = value }
end

rule(param: { key: simple(:key), value: simple(:val) }) do
[key, val]
end

rule(quoted_string: simple(:string)) do
string.to_s
end

rule(token: simple(:string)) do
string.to_s
end
end

def require_account_signature!
render json: signature_verification_failure_reason, status: signature_verification_failure_code unless signed_request_account
end
Expand Down Expand Up @@ -135,12 +102,8 @@ def fail_with!(message, **options)
end

def signature_params
@signature_params ||= begin
raw_signature = request.headers['Signature']
tree = SignatureParamsParser.new.parse(raw_signature)
SignatureParamsTransformer.new.apply(tree)
end
rescue Parslet::ParseFailed
@signature_params ||= SignatureParser.parse(request.headers['Signature'])
rescue SignatureParser::ParsingError
raise SignatureVerificationError, 'Error parsing signature parameters'
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/custom_css_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ def custom_css_styles
helper_method :custom_css_styles

def set_user_roles
@user_roles = UserRole.where(highlighted: true).where.not(color: [nil, ''])
@user_roles = UserRole.providing_styles
end
end
23 changes: 11 additions & 12 deletions app/controllers/intents_controller.rb
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
# frozen_string_literal: true

class IntentsController < ApplicationController
before_action :check_uri
EXPECTED_SCHEME = 'web+mastodon'

before_action :handle_invalid_uri, unless: :valid_uri?
rescue_from Addressable::URI::InvalidURIError, with: :handle_invalid_uri

def show
if uri.scheme == 'web+mastodon'
case uri.host
when 'follow'
return redirect_to authorize_interaction_path(uri: uri.query_values['uri'].delete_prefix('acct:'))
when 'share'
return redirect_to share_path(text: uri.query_values['text'])
end
case uri.host
when 'follow'
redirect_to authorize_interaction_path(uri: uri.query_values['uri'].delete_prefix('acct:'))
when 'share'
redirect_to share_path(text: uri.query_values['text'])
else
handle_invalid_uri
end

not_found
end

private

def check_uri
not_found if uri.blank?
def valid_uri?
uri.present? && uri.scheme == EXPECTED_SCHEME
end

def handle_invalid_uri
Expand Down
11 changes: 11 additions & 0 deletions app/helpers/react_component_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,20 @@ def react_admin_component(name, props = {})
div_tag_with_data(data)
end

def serialized_media_attachments(media_attachments)
media_attachments.map { |attachment| serialized_attachment(attachment) }
end

private

def div_tag_with_data(data)
content_tag(:div, nil, data: data)
end

def serialized_attachment(attachment)
ActiveModelSerializers::SerializableResource.new(
attachment,
serializer: REST::MediaAttachmentSerializer
).as_json
end
end
4 changes: 4 additions & 0 deletions app/javascript/core/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ Rails.delegate(document, '#form_admin_settings_enable_bootstrap_timeline_account
const onChangeRegistrationMode = (target) => {
const enabled = target.value === 'approved';

[].forEach.call(document.querySelectorAll('.form_admin_settings_registrations_mode .warning-hint'), (warning_hint) => {
warning_hint.style.display = target.value === 'open' ? 'inline' : 'none';
});

[].forEach.call(document.querySelectorAll('#form_admin_settings_require_invite_text'), (input) => {
input.disabled = !enabled;
if (enabled) {
Expand Down
9 changes: 1 addition & 8 deletions app/javascript/flavours/glitch/actions/suggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,5 @@ export const dismissSuggestion = accountId => (dispatch, getState) => {
id: accountId,
});

api(getState).delete(`/api/v1/suggestions/${accountId}`).then(() => {
dispatch(fetchSuggestionsRequest());

api(getState).get('/api/v2/suggestions').then(response => {
dispatch(importFetchedAccounts(response.data.map(x => x.account)));
dispatch(fetchSuggestionsSuccess(response.data));
}).catch(error => dispatch(fetchSuggestionsFail(error)));
}).catch(() => {});
api(getState).delete(`/api/v1/suggestions/${accountId}`).catch(() => {});
};
Loading
Loading