Fix test
This commit is contained in:
parent
35a4928cbe
commit
dd805d691b
2 changed files with 6 additions and 7 deletions
|
@ -38,11 +38,8 @@ class StatusReachFinder
|
||||||
private
|
private
|
||||||
|
|
||||||
def reached_account_inboxes
|
def reached_account_inboxes
|
||||||
if @status.limited_visibility?
|
reject_domains = @status.limited_visibility? ? banned_domains : banned_domains + friend_domains
|
||||||
Account.where(id: mentioned_account_ids).where.not(domain: banned_domains).inboxes
|
Account.where(id: reached_account_ids).where.not(domain: reject_domains).inboxes
|
||||||
else
|
|
||||||
Account.where(id: reached_account_ids).inboxes
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def reached_account_inboxes_for_misskey
|
def reached_account_inboxes_for_misskey
|
||||||
|
@ -67,6 +64,8 @@ class StatusReachFinder
|
||||||
|
|
||||||
if @status.reblog?
|
if @status.reblog?
|
||||||
[reblog_of_account_id]
|
[reblog_of_account_id]
|
||||||
|
elsif @status.limited_visibility?
|
||||||
|
[mentioned_account_ids]
|
||||||
else
|
else
|
||||||
[
|
[
|
||||||
replied_to_account_id,
|
replied_to_account_id,
|
||||||
|
@ -203,7 +202,7 @@ class StatusReachFinder
|
||||||
end
|
end
|
||||||
|
|
||||||
def banned_domains_for_misskey
|
def banned_domains_for_misskey
|
||||||
return @banned_domains_for_misskey if @banned_domains_for_misskey
|
return @banned_domains_for_misskey if defined?(@banned_domains_for_misskey)
|
||||||
|
|
||||||
return @banned_domains_for_misskey = [] if (!@status.account.user&.setting_reject_public_unlisted_subscription && !@status.account.user&.setting_reject_unlisted_subscription) || (!@status.public_unlisted_visibility? && !@status.unlisted_visibility?)
|
return @banned_domains_for_misskey = [] if (!@status.account.user&.setting_reject_public_unlisted_subscription && !@status.account.user&.setting_reject_unlisted_subscription) || (!@status.public_unlisted_visibility? && !@status.unlisted_visibility?)
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ RSpec.describe RemoveStatusService, :sidekiq_inline, type: :service do
|
||||||
|
|
||||||
it 'sends Undo activity to followers' do
|
it 'sends Undo activity to followers' do
|
||||||
subject.call(status)
|
subject.call(status)
|
||||||
expect(a_request(:post, bill.inbox_url).with(
|
expect(a_request(:post, bill.shared_inbox_url).with(
|
||||||
body: hash_including({
|
body: hash_including({
|
||||||
'type' => 'Undo',
|
'type' => 'Undo',
|
||||||
'object' => hash_including({
|
'object' => hash_including({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue