Remove inbound_quotes
feature flag (#34958)
This commit is contained in:
parent
f2cdbefa3c
commit
989ca63b59
6 changed files with 12 additions and 17 deletions
|
@ -226,8 +226,6 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
end
|
||||
|
||||
def process_quote
|
||||
return unless Mastodon::Feature.inbound_quotes_enabled?
|
||||
|
||||
@quote_uri = @status_parser.quote_uri
|
||||
return if @quote_uri.blank?
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ class ActivityPub::Activity::QuoteRequest < ActivityPub::Activity
|
|||
include Payloadable
|
||||
|
||||
def perform
|
||||
return unless Mastodon::Feature.inbound_quotes_enabled?
|
||||
return if non_matching_uri_hosts?(@account.uri, @json['id'])
|
||||
|
||||
quoted_status = status_from_uri(object_uri)
|
||||
|
|
|
@ -271,8 +271,6 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
|
|||
end
|
||||
|
||||
def update_quote!
|
||||
return unless Mastodon::Feature.inbound_quotes_enabled?
|
||||
|
||||
quote_uri = @status_parser.quote_uri
|
||||
|
||||
if quote_uri.present?
|
||||
|
|
|
@ -887,7 +887,7 @@ RSpec.describe ActivityPub::Activity::Create do
|
|||
end
|
||||
end
|
||||
|
||||
context 'with an unverifiable quote of a known post', feature: :inbound_quotes do
|
||||
context 'with an unverifiable quote of a known post' do
|
||||
let(:quoted_status) { Fabricate(:status) }
|
||||
|
||||
let(:object_json) do
|
||||
|
@ -911,7 +911,7 @@ RSpec.describe ActivityPub::Activity::Create do
|
|||
end
|
||||
end
|
||||
|
||||
context 'with an unverifiable unknown post', feature: :inbound_quotes do
|
||||
context 'with an unverifiable unknown post' do
|
||||
let(:unknown_post_uri) { 'https://unavailable.example.com/unavailable-post' }
|
||||
|
||||
let(:object_json) do
|
||||
|
@ -939,7 +939,7 @@ RSpec.describe ActivityPub::Activity::Create do
|
|||
end
|
||||
end
|
||||
|
||||
context 'with a verifiable quote of a known post', feature: :inbound_quotes do
|
||||
context 'with a verifiable quote of a known post' do
|
||||
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
||||
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
||||
let(:approval_uri) { 'https://quoted.example.com/quote-approval' }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ActivityPub::Activity::QuoteRequest, feature: :inbound_quotes do
|
||||
RSpec.describe ActivityPub::Activity::QuoteRequest do
|
||||
let(:sender) { Fabricate(:account, domain: 'example.com') }
|
||||
let(:recipient) { Fabricate(:account) }
|
||||
let(:quoted_post) { Fabricate(:status, account: recipient) }
|
||||
|
|
|
@ -435,7 +435,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when the status has an existing unverified quote and adds an approval link', feature: :inbound_quotes do
|
||||
context 'when the status has an existing unverified quote and adds an approval link' do
|
||||
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
||||
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
||||
let!(:quote) { Fabricate(:quote, status: status, quoted_status: quoted_status, approval_uri: nil) }
|
||||
|
@ -500,7 +500,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when the status has an existing verified quote and removes an approval link', feature: :inbound_quotes do
|
||||
context 'when the status has an existing verified quote and removes an approval link' do
|
||||
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
||||
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
||||
let!(:quote) { Fabricate(:quote, status: status, quoted_status: quoted_status, approval_uri: approval_uri, state: :accepted) }
|
||||
|
@ -535,7 +535,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when the status adds a verifiable quote', feature: :inbound_quotes do
|
||||
context 'when the status adds a verifiable quote' do
|
||||
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
||||
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
||||
let(:approval_uri) { 'https://quoted.example.com/approvals/1' }
|
||||
|
@ -600,7 +600,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when the status adds a unverifiable quote', feature: :inbound_quotes do
|
||||
context 'when the status adds a unverifiable quote' do
|
||||
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
||||
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
||||
let(:approval_uri) { 'https://quoted.example.com/approvals/1' }
|
||||
|
@ -635,7 +635,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when the status removes a verified quote', feature: :inbound_quotes do
|
||||
context 'when the status removes a verified quote' do
|
||||
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
||||
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
||||
let!(:quote) { Fabricate(:quote, status: status, quoted_status: quoted_status, approval_uri: approval_uri, state: :accepted) }
|
||||
|
@ -660,7 +660,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when the status removes an unverified quote', feature: :inbound_quotes do
|
||||
context 'when the status removes an unverified quote' do
|
||||
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
||||
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
||||
let!(:quote) { Fabricate(:quote, status: status, quoted_status: quoted_status, approval_uri: nil, state: :pending) }
|
||||
|
@ -684,7 +684,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when the status swaps a verified quote with an unverifiable quote', feature: :inbound_quotes do
|
||||
context 'when the status swaps a verified quote with an unverifiable quote' do
|
||||
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
||||
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
||||
let(:second_quoted_status) { Fabricate(:status, account: quoted_account) }
|
||||
|
@ -752,7 +752,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when the status swaps a verified quote with another verifiable quote', feature: :inbound_quotes do
|
||||
context 'when the status swaps a verified quote with another verifiable quote' do
|
||||
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
||||
let(:second_quoted_account) { Fabricate(:account, domain: 'second-quoted.example.com') }
|
||||
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue