Change “legacy” non-fast-tracked quote posts to not be displayed as such (#34945)

This commit is contained in:
Claire 2025-06-05 15:53:57 +02:00 committed by GitHub
parent 09208eafa4
commit 3d474807bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 26 additions and 5 deletions

View file

@ -233,7 +233,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
approval_uri = @status_parser.quote_approval_uri
approval_uri = nil if unsupported_uri_scheme?(approval_uri)
@quote = Quote.new(account: @account, approval_uri: approval_uri)
@quote = Quote.new(account: @account, approval_uri: approval_uri, legacy: @status_parser.legacy_quote?)
end
def process_hashtag(tag)

View file

@ -123,6 +123,10 @@ class ActivityPub::Parser::StatusParser
end.first
end
def legacy_quote?
!@object.key?('quote')
end
# The inlined quote; out of the attributes we support, only `https://w3id.org/fep/044f#quote` explicitly supports inlined objects
def quoted_object
as_array(@object['quote']).first