Compare commits

...

2 Commits

Author SHA1 Message Date
Matt Jankowski
229b624ea3
Merge 9f1d021230 into 94bceb8683 2025-07-11 14:05:44 +00:00
Matt Jankowski
9f1d021230 Move disable followers sync config into mastodon.x area 2025-07-03 18:29:40 -04:00
3 changed files with 3 additions and 2 deletions

View File

@ -57,7 +57,7 @@ class ActivityPub::InboxesController < ActivityPub::BaseController
def process_collection_synchronization def process_collection_synchronization
raw_params = request.headers['Collection-Synchronization'] raw_params = request.headers['Collection-Synchronization']
return if raw_params.blank? || ENV['DISABLE_FOLLOWERS_SYNCHRONIZATION'] == 'true' || signed_request_account.nil? return if raw_params.blank? || Rails.configuration.x.mastodon.disable_followers_synchronization || signed_request_account.nil?
# Re-using the syntax for signature parameters # Re-using the syntax for signature parameters
params = SignatureParser.parse(raw_params) params = SignatureParser.parse(raw_params)

View File

@ -50,7 +50,7 @@ class ActivityPub::DeliveryWorker
Request.new(:post, @inbox_url, body: @json, http_client: http_client).tap do |request| Request.new(:post, @inbox_url, body: @json, http_client: http_client).tap do |request|
request.on_behalf_of(@source_account, sign_with: @options[:sign_with]) request.on_behalf_of(@source_account, sign_with: @options[:sign_with])
request.add_headers(HEADERS) request.add_headers(HEADERS)
request.add_headers({ 'Collection-Synchronization' => synchronization_header }) if ENV['DISABLE_FOLLOWERS_SYNCHRONIZATION'] != 'true' && @options[:synchronize_followers] request.add_headers({ 'Collection-Synchronization' => synchronization_header }) if !Rails.configuration.x.mastodon.disable_followers_synchronization && @options[:synchronize_followers]
end end
end end

View File

@ -1,5 +1,6 @@
--- ---
shared: shared:
disable_followers_synchronization: <%= ENV.fetch('DISABLE_FOLLOWERS_SYNCHRONIZATION', nil) == 'true' %>
experimental_features: <%= ENV.fetch('EXPERIMENTAL_FEATURES', nil) %> experimental_features: <%= ENV.fetch('EXPERIMENTAL_FEATURES', nil) %>
limited_federation_mode: <%= (ENV.fetch('LIMITED_FEDERATION_MODE', nil) || ENV.fetch('WHITELIST_MODE', nil)) == 'true' %> limited_federation_mode: <%= (ENV.fetch('LIMITED_FEDERATION_MODE', nil) || ENV.fetch('WHITELIST_MODE', nil)) == 'true' %>
self_destruct_value: <%= ENV.fetch('SELF_DESTRUCT', nil)&.to_json %> self_destruct_value: <%= ENV.fetch('SELF_DESTRUCT', nil)&.to_json %>