Change ActivityPub path generation to all happen in ActivityPub::TagManager (#33527)
		
	This commit is contained in:
		
					parent
					
						
							
								53885b0fdb
							
						
					
				
			
			
				commit
				
					
						d517fa5ab7
					
				
			
		
					 9 changed files with 82 additions and 27 deletions
				
			
		|  | @ -44,7 +44,7 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer | |||
|   delegate :suspended?, :instance_actor?, to: :object | ||||
| 
 | ||||
|   def id | ||||
|     object.instance_actor? ? instance_actor_url : account_url(object) | ||||
|     ActivityPub::TagManager.instance.uri_for(object) | ||||
|   end | ||||
| 
 | ||||
|   def type | ||||
|  | @ -60,27 +60,27 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer | |||
|   end | ||||
| 
 | ||||
|   def following | ||||
|     account_following_index_url(object) | ||||
|     ActivityPub::TagManager.instance.following_uri_for(object) | ||||
|   end | ||||
| 
 | ||||
|   def followers | ||||
|     account_followers_url(object) | ||||
|     ActivityPub::TagManager.instance.followers_uri_for(object) | ||||
|   end | ||||
| 
 | ||||
|   def inbox | ||||
|     object.instance_actor? ? instance_actor_inbox_url : account_inbox_url(object) | ||||
|     ActivityPub::TagManager.instance.inbox_uri_for(object) | ||||
|   end | ||||
| 
 | ||||
|   def outbox | ||||
|     object.instance_actor? ? instance_actor_outbox_url : account_outbox_url(object) | ||||
|     ActivityPub::TagManager.instance.outbox_uri_for(object) | ||||
|   end | ||||
| 
 | ||||
|   def featured | ||||
|     account_collection_url(object, :featured) | ||||
|     ActivityPub::TagManager.instance.collection_uri_for(object, :featured) | ||||
|   end | ||||
| 
 | ||||
|   def featured_tags | ||||
|     account_collection_url(object, :tags) | ||||
|     ActivityPub::TagManager.instance.collection_uri_for(object, :tags) | ||||
|   end | ||||
| 
 | ||||
|   def endpoints | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue