parent
7a6ec3603e
commit
294acdfd94
4 changed files with 29 additions and 26 deletions
|
@ -278,7 +278,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
def audience_searchable_by
|
||||
return nil if @json['searchableBy'].nil?
|
||||
|
||||
@audience_searchable_by_processaccountservice = as_array(@json['searchableBy']).map { |x| value_or_id(x) }
|
||||
@audience_searchable_by_processaccountservice = as_array(@json['searchableBy']).map { |x| value_or_id(x) }.compact_blank
|
||||
end
|
||||
|
||||
def searchability_from_audience
|
||||
|
@ -289,14 +289,16 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
return invalid_subscription_software? ? misskey_searchability_from_indexable : :direct
|
||||
end
|
||||
|
||||
return :limited if audience_searchable_by.include?('kmyblue:Limited') || audience_searchable_by.include?('as:Limited')
|
||||
|
||||
if audience_searchable_by.any? { |uri| ActivityPub::TagManager.instance.public_collection?(uri) }
|
||||
:public
|
||||
elsif audience_searchable_by.include?(@account.followers_url)
|
||||
:private
|
||||
elsif audience_searchable_by.include?('kmyblue:Limited') || audience_searchable_by.include?('as:Limited')
|
||||
:limited
|
||||
else
|
||||
elsif audience_searchable_by.include?(@account.uri) || audience_searchable_by.include?(@account.url)
|
||||
:direct
|
||||
else
|
||||
:limited
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue