parent
							
								
									3389730242
								
							
						
					
					
						commit
						f44df38ea1
					
				
					 1 changed files with 9 additions and 1 deletions
				
			
		
							
								
								
									
										10
									
								
								src/apub.rs
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/apub.rs
									
										
									
									
									
								
							|  | @ -81,9 +81,17 @@ pub struct AcceptedActors { | ||||||
| 
 | 
 | ||||||
|     pub inbox: XsdAnyUri, |     pub inbox: XsdAnyUri, | ||||||
| 
 | 
 | ||||||
|  |     pub endpoints: Endpoints, | ||||||
|  | 
 | ||||||
|     pub public_key: PublicKey, |     pub public_key: PublicKey, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | #[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] | ||||||
|  | #[serde(rename_all = "camelCase")] | ||||||
|  | pub struct Endpoints { | ||||||
|  |     shared_inbox: Option<XsdAnyUri>, | ||||||
|  | } | ||||||
|  | 
 | ||||||
| impl PublicKey { | impl PublicKey { | ||||||
|     pub fn to_ext(self) -> PublicKeyExtension { |     pub fn to_ext(self) -> PublicKeyExtension { | ||||||
|         self.into() |         self.into() | ||||||
|  | @ -174,6 +182,6 @@ impl ValidObjects { | ||||||
| 
 | 
 | ||||||
| impl AcceptedActors { | impl AcceptedActors { | ||||||
|     pub fn inbox(&self) -> &XsdAnyUri { |     pub fn inbox(&self) -> &XsdAnyUri { | ||||||
|         &self.inbox |         self.endpoints.shared_inbox.as_ref().unwrap_or(&self.inbox) | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue