Fix issuance of quote approval for remote private statuses (#36693)

This commit is contained in:
Claire 2025-11-03 15:15:18 +01:00 committed by GitHub
parent bae5877c84
commit e79e42f8f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,7 +9,7 @@ class ActivityPub::QuoteAuthorizationsController < ActivityPub::BaseController
before_action :set_quote_authorization before_action :set_quote_authorization
def show def show
expires_in 30.seconds, public: true if @quote.status.distributable? && public_fetch_mode? expires_in 30.seconds, public: true if @quote.quoted_status.distributable? && public_fetch_mode?
render json: @quote, serializer: ActivityPub::QuoteAuthorizationSerializer, adapter: ActivityPub::Adapter, content_type: 'application/activity+json' render json: @quote, serializer: ActivityPub::QuoteAuthorizationSerializer, adapter: ActivityPub::Adapter, content_type: 'application/activity+json'
end end
@ -23,7 +23,7 @@ class ActivityPub::QuoteAuthorizationsController < ActivityPub::BaseController
@quote = Quote.accepted.where(quoted_account: @account).find(params[:id]) @quote = Quote.accepted.where(quoted_account: @account).find(params[:id])
return not_found unless @quote.status.present? && @quote.quoted_status.present? return not_found unless @quote.status.present? && @quote.quoted_status.present?
authorize @quote.status, :show? authorize @quote.quoted_status, :show?
rescue Mastodon::NotPermittedError rescue Mastodon::NotPermittedError
not_found not_found
end end