Merge pull request #3162 from ClearlyClaire/glitch-soc/merge-upstream

Merge upstream changes up to 8d3bca3bb8c84e1e3735eb71bdce7acac3779bff
This commit is contained in:
Claire 2025-08-19 21:43:34 +02:00 committed by GitHub
commit 183e9d953b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -6,4 +6,5 @@ class REST::ShallowStatusSerializer < REST::StatusSerializer
# It looks like redefining one `has_one` requires redefining all inherited ones
has_one :preview_card, key: :card, serializer: REST::PreviewCardSerializer
has_one :preloadable_poll, key: :poll, serializer: REST::PollSerializer
has_one :quote_approval, if: -> { Mastodon::Feature.outgoing_quotes_enabled? }
end

View File

@ -31,6 +31,8 @@ class REST::StatusSerializer < ActiveModel::Serializer
has_many :tags
has_many :emojis, serializer: REST::CustomEmojiSerializer
# Due to a ActiveModel::Serializer quirk, if you change any of the following, have a look at
# updating `app/serializers/rest/shallow_status_serializer.rb` as well
has_one :quote, key: :quote, serializer: REST::QuoteSerializer
has_one :preview_card, key: :card, serializer: REST::PreviewCardSerializer
has_one :preloadable_poll, key: :poll, serializer: REST::PollSerializer