Add new public status index (#26344)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com> Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
		
					parent
					
						
							
								96bcee66fb
							
						
					
				
			
			
				commit
				
					
						30c191aaa0
					
				
			
		
					 28 changed files with 584 additions and 87 deletions
				
			
		|  | @ -8,13 +8,13 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer | |||
| 
 | ||||
|   context_extensions :manually_approves_followers, :featured, :also_known_as, | ||||
|                      :moved_to, :property_value, :discoverable, :olm, :suspended, | ||||
|                      :memorial | ||||
|                      :memorial, :indexable | ||||
| 
 | ||||
|   attributes :id, :type, :following, :followers, | ||||
|              :inbox, :outbox, :featured, :featured_tags, | ||||
|              :preferred_username, :name, :summary, | ||||
|              :url, :manually_approves_followers, | ||||
|              :discoverable, :published, :memorial | ||||
|              :discoverable, :indexable, :published, :memorial | ||||
| 
 | ||||
|   has_one :public_key, serializer: ActivityPub::PublicKeySerializer | ||||
| 
 | ||||
|  | @ -99,6 +99,10 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer | |||
|     object.suspended? ? false : (object.discoverable || false) | ||||
|   end | ||||
| 
 | ||||
|   def indexable | ||||
|     object.suspended? ? false : (object.indexable || false) | ||||
|   end | ||||
| 
 | ||||
|   def name | ||||
|     object.suspended? ? object.username : (object.display_name.presence || object.username) | ||||
|   end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue