mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 09:21:11 +00:00
Do not mark remote quotes of local posts as approved before request (#35860)
This commit is contained in:
parent
20bc34ca52
commit
3fd629cf84
|
@ -307,7 +307,7 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
|
|||
@quote_changed = true
|
||||
else
|
||||
quote = @status.quote
|
||||
quote.update(approval_uri: approval_uri, state: :pending, legacy: @status_parser.legacy_quote?) if quote.approval_uri != @status_parser.quote_approval_uri
|
||||
quote.update(approval_uri: approval_uri, state: :pending, legacy: @status_parser.legacy_quote?) if quote.approval_uri != approval_uri
|
||||
end
|
||||
else
|
||||
quote = Quote.create(status: @status, approval_uri: approval_uri, legacy: @status_parser.legacy_quote?)
|
||||
|
|
|
@ -13,7 +13,7 @@ class ActivityPub::VerifyQuoteService < BaseService
|
|||
@fetching_error = nil
|
||||
|
||||
fetch_quoted_post_if_needed!(fetchable_quoted_uri, prefetched_body: prefetched_quoted_object)
|
||||
return handle_local_quote! if quote.quoted_account&.local?
|
||||
return if quote.quoted_account&.local?
|
||||
return if fast_track_approval! || quote.approval_uri.blank?
|
||||
|
||||
@json = fetch_approval_object(quote.approval_uri, prefetched_body: prefetched_approval)
|
||||
|
@ -35,15 +35,6 @@ class ActivityPub::VerifyQuoteService < BaseService
|
|||
|
||||
private
|
||||
|
||||
def handle_local_quote!
|
||||
@quote.update!(approval_uri: nil)
|
||||
if StatusPolicy.new(@quote.account, @quote.quoted_status).quote?
|
||||
@quote.accept!
|
||||
else
|
||||
@quote.reject!
|
||||
end
|
||||
end
|
||||
|
||||
# FEP-044f defines rules that don't require the approval flow
|
||||
def fast_track_approval!
|
||||
return false if @quote.quoted_status_id.blank?
|
||||
|
|
Loading…
Reference in New Issue
Block a user