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

Upstream 20240926 #850

Merged
merged 95 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
f3f06da
Update dependency babel-loader to v8.4.1 (#31931)
renovate[bot] Sep 18, 2024
a397141
Move non-action public method controller callback to private methods …
mjankowski Sep 18, 2024
b7548db
Update dependency memory_profiler to v1.1.0 (#31947)
renovate[bot] Sep 18, 2024
bd86c69
New Crowdin Translations (automated) (#31959)
github-actions[bot] Sep 18, 2024
6f3d751
Update dependency dotenv to v3.1.4 (#31953)
renovate[bot] Sep 18, 2024
9437386
Remove unneeded `to_s` on `Link` header comparison in statuses contro…
mjankowski Sep 18, 2024
eb16763
Use `have_http_link_header` matcher in `api/v1/trends/*` specs (#31940)
mjankowski Sep 18, 2024
a791274
Update dependency sass to v1.79.1 (#31958)
renovate[bot] Sep 18, 2024
7740f1a
Mute XHR abort errors (#31952)
c960657 Sep 18, 2024
2d399f5
Update dependency pg-connection-string to v2.7.0 (#31950)
renovate[bot] Sep 18, 2024
5405bdd
Remove unused E2EE messaging code (#31193)
mjankowski Sep 18, 2024
6f836c4
Remove `crypto` values from doorkeeper application/token `scopes` (#3…
mjankowski Sep 18, 2024
bf8eaaa
Convert controller spec for security_key_options endpoint to request …
mjankowski Sep 18, 2024
42f9f50
Update dependency pg to v8.13.0 (#31949)
renovate[bot] Sep 18, 2024
e3baa1c
Add coverage for `AccountDeletionRequest` class (#31937)
mjankowski Sep 18, 2024
8b70834
Fix the appearance of avatars when they do not load (#31966)
renchap Sep 18, 2024
29656cb
Fix sass deprecation warning (#31961)
Gargron Sep 18, 2024
62a39d6
Fix rolling updates by moving DropEndToEndMessageTables to post-deplo…
ClearlyClaire Sep 19, 2024
90db524
Update dependency puma to v6.4.3 (#31975)
renovate[bot] Sep 19, 2024
1fce55c
Update dependency aws-sdk-s3 to v1.163.0 (#31972)
renovate[bot] Sep 19, 2024
b071e61
Combine API request spec assertions (#31970)
mjankowski Sep 19, 2024
5d573c9
Remove unused E2EE-related methods (#31964)
mjankowski Sep 19, 2024
efdc175
New Crowdin Translations (automated) (#31974)
github-actions[bot] Sep 19, 2024
ef4d6ab
Fix browser glitch caused by two overlapping scroll animations in web…
Gargron Sep 19, 2024
6801afa
Update dependency devise-two-factor to v6 [SECURITY] (#31957)
renovate[bot] Sep 19, 2024
2946a92
Use `headers` shorthand in mailers (#31956)
mjankowski Sep 19, 2024
5a8f2fe
Convert `settings/exports` controller spec to system/request specs (#…
mjankowski Sep 19, 2024
57a38f0
Fix custom `history.push` and `history.replace` building bogus locati…
ClearlyClaire Sep 19, 2024
ae03e4f
Update directory page options to use URL params (#31977)
renchap Sep 19, 2024
09459ed
Update dependency react-select to v5.8.1 (#31982)
renovate[bot] Sep 20, 2024
9a03902
Capture actual behavior in v2/notifications "someone else" dismiss sc…
mjankowski Sep 20, 2024
840fd69
Update dependency sass to v1.79.2 (#31992)
renovate[bot] Sep 20, 2024
162f9a3
New Crowdin Translations (automated) (#31993)
github-actions[bot] Sep 20, 2024
c922af2
Add `LIMIT` constant for `api/v1/peers/search` endpoint (#31989)
mjankowski Sep 20, 2024
04a939d
Add `reviewed` and `unreviewed` scopes to `Reviewable` model concern …
mjankowski Sep 20, 2024
e7fd098
Change zoom icon in web UI (#29683)
Gargron Sep 20, 2024
8afa3bb
Change Mastodon to issue correctly-signed queries by default (#31994)
ClearlyClaire Sep 20, 2024
bdf83c3
Move default embed size knowledge into `OEmbedSerializer` (#31990)
mjankowski Sep 20, 2024
a7dbf6f
Use heredoc/squish for inline css styles in oembed serializer (#31991)
mjankowski Sep 20, 2024
6632606
Add `response.content_type` checks for JSON to `api/v1` request specs…
mjankowski Sep 20, 2024
171394e
Add coverage for CSV responses for severed relationships (#31962)
mjankowski Sep 20, 2024
d55f4fb
Add content type checks to api/v2 request specs (#31983)
mjankowski Sep 20, 2024
ed8b0e4
Fix links for reblogs in moderation interface (#31979)
ClearlyClaire Sep 20, 2024
7ed9c59
Fix issue when encountering reblog of deleted post in feed rebuild (#…
ClearlyClaire Sep 20, 2024
efc0d4d
Update dependency react-intl to v6.7.0 (#32028)
renovate[bot] Sep 23, 2024
f294c4a
Update libretranslate/libretranslate Docker tag to v1.6.1 (#32027)
renovate[bot] Sep 23, 2024
84d0438
Update DefinitelyTyped types (non-major) (#32026)
renovate[bot] Sep 23, 2024
c37f9c0
Update dependency jsdom to v25.0.1 (#32017)
renovate[bot] Sep 23, 2024
f4632d9
Update dependency aws-sdk-s3 to v1.164.0 (#32010)
renovate[bot] Sep 23, 2024
958f01e
Update dependency sass to v1.79.3 (#32009)
renovate[bot] Sep 23, 2024
10d2f83
Update dependency selenium-webdriver to v4.25.0 (#32008)
renovate[bot] Sep 23, 2024
5fae1d5
Fix OAuth authorization prompt referring to third-party apps (#32005)
Gargron Sep 23, 2024
e0b45b3
Combine repeated parsed_body assertions into single (#32002)
mjankowski Sep 23, 2024
0ba3ad4
Remove `body_json_ids` from api/v2/admin/accounts spec (#32003)
mjankowski Sep 23, 2024
ed90d93
New Crowdin Translations (automated) (#32011)
github-actions[bot] Sep 23, 2024
11eae69
Feature more otel customization (#31998)
timetinytim Sep 23, 2024
770ec92
Update Yarn to v4.5.0 (#31914)
renovate[bot] Sep 23, 2024
5d6a3f2
Update dependency google-protobuf (#32029)
ClearlyClaire Sep 23, 2024
cd7b670
Reduce factory creation in `User#reset_password!` spec (#32021)
mjankowski Sep 23, 2024
66ed7ea
Move status creation to "with rss" context in accounts request spec (…
mjankowski Sep 23, 2024
447d0a3
Remove double no-records cases in `api/v1/admin` req specs (#32014)
mjankowski Sep 23, 2024
2b4bda8
Add `response_avatar_link` helper to webfinger request spec (#31999)
mjankowski Sep 23, 2024
bbf7752
Combine assertions in `Notification` model spec (#32015)
mjankowski Sep 23, 2024
b5bdc69
Change mobile breakpoint back to old version and allow main column to…
ClearlyClaire Sep 23, 2024
aaab6b7
Add reblogs and favourites counts to statuses in ActivityPub (#32007)
Gargron Sep 23, 2024
5dfdec6
Convert `settings/applications` controller spec to system/request spe…
mjankowski Sep 23, 2024
d54ce67
Change hide media button to be in top right corner in web UI (#32048)
Gargron Sep 24, 2024
c808055
Update dependency webrick (#32054)
ClearlyClaire Sep 24, 2024
11ac5c8
New Crowdin Translations (automated) (#32052)
github-actions[bot] Sep 24, 2024
7c61533
Update dependency aws-sdk-s3 to v1.165.0 (#32050)
renovate[bot] Sep 24, 2024
780e2e9
Convert notification mailer spec shared examples to matchers (#32047)
mjankowski Sep 24, 2024
19dedd7
Set important mailer headers with `after_action` callback (#32057)
mjankowski Sep 24, 2024
cfb8fc6
Increase regexp timeout and allow override (#32056)
oneiros Sep 24, 2024
0a6b75b
Fix multiple bugs in notification requests and notification policies …
ClearlyClaire Sep 24, 2024
c36a76b
Fix error when accepting appeal for sensitive posts deleted in the me…
ClearlyClaire Sep 24, 2024
556837f
Fix the summary of converted object types to be treated as HTML (#28629)
Menrath Sep 24, 2024
f1b6a61
Fix wrapping in dashboard quick access buttons (#32043)
renchap Sep 24, 2024
7098851
Fix too many requests caused by relationship look-ups in web UI (#32042)
Gargron Sep 24, 2024
a773c23
Update dependency aws-sdk-s3 to v1.166.0 (#32079)
renovate[bot] Sep 25, 2024
4e6fc3a
New Crowdin Translations (automated) (#32083)
github-actions[bot] Sep 25, 2024
69aa569
Use `not-allowed` for cursor on disabled buttons (#32076)
mjankowski Sep 25, 2024
06ecf90
Remove single-use shared examples in controller specs (#32044)
mjankowski Sep 25, 2024
c3b6a7a
Reduce factory creation (36 -> 12) in `spec/controllers/oauth/*` area…
mjankowski Sep 25, 2024
c2ef83e
Consolidate shared `a scope` example parts into one attributes check …
mjankowski Sep 25, 2024
83574f6
Add coverage and use mailer callback to check functional user in noti…
mjankowski Sep 25, 2024
3dc4ddc
Fix search params being dropped when redirected to non-deck path (#31…
renchap Sep 25, 2024
d6f5ee7
Add notification grouping for follow notifications (#32085)
renchap Sep 25, 2024
51777fe
Prefer structure checks over multi-line size/parts checks in `parsed_…
mjankowski Sep 25, 2024
739ad0e
Keep the status action buttons at their position regardless of the co…
renchap Sep 25, 2024
28966fa
Remove deprecated `v2_alpha` endpoint for grouped notifications (#32089)
renchap Sep 25, 2024
28c4eca
Change responsive break points on navigation panel in web UI (#32034)
Gargron Sep 25, 2024
3426ea2
Add preview of followers removed in domain block modal in web UI (#32…
Gargron Sep 25, 2024
db33255
Rename "Data export" menu item (#32099)
c960657 Sep 25, 2024
c905714
Merge remote-tracking branch 'parent/main' into upstream-20240926
kmycode Sep 25, 2024
1299c58
Fix test
kmycode Sep 25, 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/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
hard: -1

libretranslate:
image: libretranslate/libretranslate:v1.6.0
image: libretranslate/libretranslate:v1.6.1
restart: unless-stopped
volumes:
- lt-data:/home/libretranslate/.local
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ gem 'color_diff', '~> 0.1'
gem 'csv', '~> 3.2'
gem 'discard', '~> 1.2'
gem 'doorkeeper', '~> 5.6'
gem 'ed25519', '~> 1.3'
gem 'fast_blank', '~> 1.0'
gem 'fastimage'
gem 'hiredis', '~> 0.6'
Expand Down
32 changes: 15 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,20 @@ GEM
attr_required (1.0.2)
awrence (1.2.1)
aws-eventstream (1.3.0)
aws-partitions (1.974.0)
aws-sdk-core (3.205.0)
aws-partitions (1.978.0)
aws-sdk-core (3.209.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.91.0)
aws-sdk-core (~> 3, >= 3.205.0)
aws-sdk-kms (1.94.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.162.0)
aws-sdk-core (~> 3, >= 3.205.0)
aws-sdk-s3 (1.166.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.9.1)
aws-sigv4 (1.10.0)
aws-eventstream (~> 1, >= 1.0.2)
azure-storage-blob (2.0.3)
azure-storage-common (~> 2.0)
Expand Down Expand Up @@ -197,7 +197,7 @@ GEM
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise-two-factor (5.1.0)
devise-two-factor (6.0.0)
activesupport (~> 7.0)
devise (~> 4.0)
railties (~> 7.0)
Expand All @@ -212,9 +212,8 @@ GEM
domain_name (0.6.20240107)
doorkeeper (5.7.1)
railties (>= 5)
dotenv (3.1.2)
dotenv (3.1.4)
drb (2.2.1)
ed25519 (1.3.0)
elasticsearch (7.17.11)
elasticsearch-api (= 7.17.11)
elasticsearch-transport (= 7.17.11)
Expand Down Expand Up @@ -290,7 +289,7 @@ GEM
raabro (~> 1.4)
globalid (1.2.1)
activesupport (>= 6.1)
google-protobuf (3.25.4)
google-protobuf (3.25.5)
googleapis-common-protos-types (1.15.0)
google-protobuf (>= 3.18, < 5.a)
haml (6.3.0)
Expand Down Expand Up @@ -407,7 +406,7 @@ GEM
llhttp-ffi (0.5.0)
ffi-compiler (~> 1.0)
rake (~> 13.0)
logger (1.6.0)
logger (1.6.1)
lograge (0.14.0)
actionpack (>= 4)
activesupport (>= 4)
Expand All @@ -429,7 +428,7 @@ GEM
addressable (~> 2.5)
azure-storage-blob (~> 2.0.1)
hashie (~> 5.0)
memory_profiler (1.0.2)
memory_profiler (1.1.0)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0820)
Expand Down Expand Up @@ -610,7 +609,7 @@ GEM
psych (5.1.2)
stringio
public_suffix (6.0.1)
puma (6.4.2)
puma (6.4.3)
nio4r (~> 2.0)
pundit (2.4.0)
activesupport (>= 3.0.0)
Expand Down Expand Up @@ -782,7 +781,7 @@ GEM
scenic (1.8.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
selenium-webdriver (4.24.0)
selenium-webdriver (4.25.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
Expand Down Expand Up @@ -894,7 +893,7 @@ GEM
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
webrick (1.8.1)
webrick (1.8.2)
websocket (1.2.11)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
Expand Down Expand Up @@ -937,7 +936,6 @@ DEPENDENCIES
discard (~> 1.2)
doorkeeper (~> 5.6)
dotenv
ed25519 (~> 1.3)
email_spec
fabrication (~> 2.30)
faker (~> 3.2)
Expand Down
18 changes: 0 additions & 18 deletions app/controllers/activitypub/claims_controller.rb

This file was deleted.

6 changes: 2 additions & 4 deletions app/controllers/activitypub/collections_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ def set_items
@items = @items.map { |item| item.distributable? ? item : ActivityPub::TagManager.instance.uri_for(item) }
when 'tags'
@items = for_signed_account { @account.featured_tags }
when 'devices'
@items = @account.devices
else
not_found
end
end

def set_size
case params[:id]
when 'featured', 'devices', 'tags'
when 'featured', 'tags'
@size = @items.size
else
not_found
Expand All @@ -42,7 +40,7 @@ def set_type
case params[:id]
when 'featured'
@type = :ordered
when 'devices', 'tags'
when 'tags'
@type = :unordered
else
not_found
Expand Down
36 changes: 36 additions & 0 deletions app/controllers/activitypub/likes_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# frozen_string_literal: true

class ActivityPub::LikesController < ActivityPub::BaseController
include Authorization

vary_by -> { 'Signature' if authorized_fetch_mode? }

before_action :require_account_signature!, if: :authorized_fetch_mode?
before_action :set_status

def index
expires_in 0, public: @status.distributable? && public_fetch_mode?
render json: likes_collection_presenter, serializer: ActivityPub::CollectionSerializer, adapter: ActivityPub::Adapter, content_type: 'application/activity+json'
end

private

def pundit_user
signed_request_account
end

def set_status
@status = @account.statuses.find(params[:status_id])
authorize @status, :show?
rescue Mastodon::NotPermittedError
not_found
end

def likes_collection_presenter
ActivityPub::CollectionPresenter.new(
id: account_status_likes_url(@account, @status),
type: :unordered,
size: @status.favourites_count
)
end
end
1 change: 1 addition & 0 deletions app/controllers/activitypub/references_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def references_collection_presenter
ActivityPub::CollectionPresenter.new(
type: :unordered,
id: ActivityPub::TagManager.instance.references_uri_for(@status),
size: @status.status_referred_by_count,
first: page
)
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/activitypub/replies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ActivityPub::RepliesController < ActivityPub::BaseController
before_action :set_replies

def index
expires_in 0, public: public_fetch_mode?
expires_in 0, public: @status.distributable? && public_fetch_mode?
render json: replies_collection_presenter, serializer: ActivityPub::CollectionSerializer, adapter: ActivityPub::Adapter, content_type: 'application/activity+json', skip_activities: true
end

Expand Down
36 changes: 36 additions & 0 deletions app/controllers/activitypub/shares_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# frozen_string_literal: true

class ActivityPub::SharesController < ActivityPub::BaseController
include Authorization

vary_by -> { 'Signature' if authorized_fetch_mode? }

before_action :require_account_signature!, if: :authorized_fetch_mode?
before_action :set_status

def index
expires_in 0, public: @status.distributable? && public_fetch_mode?
render json: shares_collection_presenter, serializer: ActivityPub::CollectionSerializer, adapter: ActivityPub::Adapter, content_type: 'application/activity+json'
end

private

def pundit_user
signed_request_account
end

def set_status
@status = @account.statuses.find(params[:status_id])
authorize @status, :show?
rescue Mastodon::NotPermittedError
not_found
end

def shares_collection_presenter
ActivityPub::CollectionPresenter.new(
id: account_status_shares_url(@account, @status),
type: :unordered,
size: @status.reblogs_count
)
end
end
10 changes: 1 addition & 9 deletions app/controllers/api/oembed_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Api::OEmbedController < Api::BaseController
before_action :require_public_status!

def show
render json: @status, serializer: OEmbedSerializer, width: maxwidth_or_default, height: maxheight_or_default
render json: @status, serializer: OEmbedSerializer, width: params[:maxwidth], height: params[:maxheight]
end

private
Expand All @@ -23,12 +23,4 @@ def require_public_status!
def status_finder
StatusFinder.new(params[:url])
end

def maxwidth_or_default
(params[:maxwidth].presence || 400).to_i
end

def maxheight_or_default
params[:maxheight].present? ? params[:maxheight].to_i : nil
end
end
30 changes: 0 additions & 30 deletions app/controllers/api/v1/crypto/deliveries_controller.rb

This file was deleted.

47 changes: 0 additions & 47 deletions app/controllers/api/v1/crypto/encrypted_messages_controller.rb

This file was deleted.

25 changes: 0 additions & 25 deletions app/controllers/api/v1/crypto/keys/claims_controller.rb

This file was deleted.

Loading
Loading