FEP-5feb: Search indexing consent for actors

To enable this, couldn’t we extend the indexable property to accept an audience-targeting-like notation like as:Public and https://example.com/users/1/followers (i.e. extend its range to xsd:boolean | as:Actor | as:Collection)?

Yes, Mastodon might only want to support the “public” and “private” consent levels, but I think not every implementation wants to stick to that coarse granularity, so I believe the protocol should be flexible enough to support both the needs. If you don’t want to support the intermediate consent levels, you can just fall back to “private” consent, like so:

diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb
index 1e2d614d7..6c5e89067 100644
--- a/app/services/activitypub/process_account_service.rb
+++ b/app/services/activitypub/process_account_service.rb
@@ -115,7 +115,7 @@ class ActivityPub::ProcessAccountService < BaseService
     @account.fields                  = property_values || {}
     @account.also_known_as           = as_array(@json['alsoKnownAs'] || []).map { |item| value_or_id(item) }
     @account.discoverable            = @json['discoverable'] || false
-    @account.indexable               = @json['indexable'] || false
+    @account.indexable               = @json['indexable'] == true || as_array(@json['indexable'] || []).include?(ActivityPub::TagManager::COLLECTIONS[:public])
     @account.memorial                = @json['memorial'] || false
     @account.attribution_domains     = as_array(@json['attributionDomains'] || []).map { |item| value_or_id(item) }
   end
2 Likes