Remove firefish as misskey fork #16
This commit is contained in:
parent
b3076e6ffc
commit
a8f02d0245
5 changed files with 4 additions and 47 deletions
|
@ -559,7 +559,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
info = instance_info
|
||||
return false if info.nil?
|
||||
|
||||
%w(misskey calckey firefish).include?(info.software)
|
||||
%w(misskey calckey).include?(info.software)
|
||||
end
|
||||
|
||||
def misskey_searchability
|
||||
|
|
|
@ -159,7 +159,7 @@ class StatusReachFinder
|
|||
def banned_domains_for_misskey_of_status(status)
|
||||
return [] unless (status.public_unlisted_visibility? && status.account.user&.setting_reject_public_unlisted_subscription) || (status.unlisted_visibility? && status.account.user&.setting_reject_unlisted_subscription)
|
||||
|
||||
from_info = InstanceInfo.where(software: %w(misskey calckey firefish)).pluck(:domain)
|
||||
from_info = InstanceInfo.where(software: %w(misskey calckey)).pluck(:domain)
|
||||
from_domain_block = DomainBlock.where(detect_invalid_subscription: true).pluck(:domain)
|
||||
(from_info + from_domain_block).uniq
|
||||
end
|
||||
|
|
|
@ -305,7 +305,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
info = instance_info
|
||||
return false if info.nil?
|
||||
|
||||
%w(misskey calckey firefish).include?(info.software)
|
||||
%w(misskey calckey).include?(info.software)
|
||||
end
|
||||
|
||||
def subscribable_by
|
||||
|
|
|
@ -121,12 +121,7 @@ class DeliveryAntennaService
|
|||
when :public, :public_unlisted, :login, :limited
|
||||
false
|
||||
when :unlisted
|
||||
if @status.local?
|
||||
!@status.public_searchability?
|
||||
else
|
||||
info = InstanceInfo.find_by(domain: @status.account.domain)
|
||||
info&.software == 'firefish' || !@status.public_searchability?
|
||||
end
|
||||
else
|
||||
true
|
||||
end
|
||||
|
|
|
@ -362,42 +362,4 @@ RSpec.describe DeliveryAntennaService, type: :service do
|
|||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'with federated unlisted post' do
|
||||
let(:visibility) { :unlisted }
|
||||
let(:searchability) { :public }
|
||||
let(:domain) { 'fast.example.com' }
|
||||
let!(:antenna) { antenna_with_keyword(bob, 'body') }
|
||||
let!(:empty_antenna) { antenna_with_keyword(tom, 'body') }
|
||||
|
||||
context 'when unknown domain' do
|
||||
let(:software) { nil }
|
||||
|
||||
it 'detecting antenna' do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
expect(antenna_feed_of(empty_antenna)).to include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'when misskey domain' do
|
||||
let(:software) { 'misskey' }
|
||||
|
||||
it 'detecting antenna' do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
expect(antenna_feed_of(empty_antenna)).to include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'when firefish domain' do
|
||||
let(:software) { 'firefish' }
|
||||
|
||||
it 'detecting antenna' do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
end
|
||||
|
||||
it 'not detecting antenna' do
|
||||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue