|
|
|
|
@ -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?
|
|
|
|
|
|