Merge commit 'e5826777b6c06a32b97388657beaca1e5eccb421' into glitch-soc/merge-upstream

Conflicts:
- `config/settings.yml`:
  Not a real conflict, upstream removed settings that are identical in glitch-soc
  but textually adjacent to glitch-soc-only settings.
  Removed what upstream removed.
This commit is contained in:
Claire
2025-07-30 20:05:45 +02:00
172 changed files with 2202 additions and 647 deletions

View File

@@ -14,6 +14,7 @@ module Mastodon
class InvalidParameterError < Error; end
class SignatureVerificationError < Error; end
class MalformedHeaderError < Error; end
class RecursionLimitExceededError < Error; end
class UnexpectedResponseError < Error
attr_reader :response

View File

@@ -313,9 +313,7 @@ module Mastodon::CLI
end
def combined_media_sum
Arel.sql(<<~SQL.squish)
COALESCE(file_file_size, 0) + COALESCE(thumbnail_file_size, 0)
SQL
MediaAttachment.combined_media_file_size
end
def preload_records_from_mixed_objects(objects)

View File

@@ -0,0 +1,11 @@
# frozen_string_literal: true
class Mastodon::WorkerBatchMiddleware
def call(_worker, msg, _queue, _redis_pool = nil)
if (batch = Thread.current[:batch])
batch.add_jobs([msg['jid']])
end
yield
end
end