Fix searchability api to compat with fedibird
This commit is contained in:
parent
6735a422ab
commit
de9e4b964c
9 changed files with 32 additions and 33 deletions
|
@ -475,9 +475,9 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
elsif audience_searchable_by.any? { |uri| ActivityPub::TagManager.instance.public_collection?(uri) }
|
||||
:public
|
||||
elsif audience_searchable_by.include?(@account.followers_url)
|
||||
:unlisted # Followers only in kmyblue (generics: private)
|
||||
:private
|
||||
else
|
||||
:private # Reaction only in kmyblue (generics: direct)
|
||||
:direct
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -507,9 +507,9 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
if searchability == visibility
|
||||
searchability
|
||||
elsif [:public, :unlisted].include?(searchability) && [:public, :unlisted].include?(visibility) # unlisted is Followers only in kmyblue (generics: private)
|
||||
:unlisted
|
||||
:private
|
||||
else
|
||||
:private # Reaction only in kmyblue (generics: direct)
|
||||
:direct
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -211,11 +211,9 @@ class ActivityPub::TagManager
|
|||
case status.compute_searchability_activitypub
|
||||
when 'public'
|
||||
[COLLECTIONS[:public]]
|
||||
when 'unlisted' # Followers only in kmyblue (generics: private)
|
||||
when 'private'
|
||||
[account_followers_url(status.account)]
|
||||
# when 'private' # Reaction only in kmyblue (generics: direct)
|
||||
# []
|
||||
when 'limited'
|
||||
when 'direct'
|
||||
status.conversation_id.present? ? [uri_for(status.conversation)] : []
|
||||
else
|
||||
[]
|
||||
|
@ -228,7 +226,7 @@ class ActivityPub::TagManager
|
|||
case account.searchability
|
||||
when 'public'
|
||||
[COLLECTIONS[:public]]
|
||||
when 'unlisted', 'private'
|
||||
when 'private', 'direct'
|
||||
[account_followers_url(account)]
|
||||
else
|
||||
[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue