Skip to content

Commit

Permalink
Remove firefish but add meisskey as misskey fork
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Sep 23, 2023
1 parent b87c4b5 commit 0513db1
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 47 deletions.
2 changes: 1 addition & 1 deletion app/lib/activitypub/activity/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ def misskey_software?
info = instance_info
return false if info.nil?

%w(misskey calckey firefish).include?(info.software)
%w(misskey calckey meisskey).include?(info.software)
end

def misskey_searchability
Expand Down
2 changes: 1 addition & 1 deletion app/lib/status_reach_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def banned_domains_for_misskey
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 meisskey)).pluck(:domain)
from_domain_block = DomainBlock.where(detect_invalid_subscription: true).pluck(:domain)
(from_info + from_domain_block).uniq
end
Expand Down
2 changes: 1 addition & 1 deletion app/services/activitypub/process_account_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def misskey_software?
info = instance_info
return false if info.nil?

%w(misskey calckey firefish).include?(info.software)
%w(misskey calckey meisskey).include?(info.software)
end

def subscribable_by
Expand Down
7 changes: 1 addition & 6 deletions app/services/delivery_antenna_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,7 @@ def followers_only?
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
!@status.public_searchability?
else
true
end
Expand Down
38 changes: 0 additions & 38 deletions spec/services/delivery_antenna_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -362,42 +362,4 @@ def list(owner)
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

0 comments on commit 0513db1

Please sign in to comment.