mirror of
https://git.asonix.dog/asonix/relay.git
synced 2024-12-25 03:40:31 +00:00
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 endpoints: Endpoints,
|
||||
|
||||
pub public_key: PublicKey,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Endpoints {
|
||||
shared_inbox: Option<XsdAnyUri>,
|
||||
}
|
||||
|
||||
impl PublicKey {
|
||||
pub fn to_ext(self) -> PublicKeyExtension {
|
||||
self.into()
|
||||
|
@ -174,6 +182,6 @@ impl ValidObjects {
|
|||
|
||||
impl AcceptedActors {
|
||||
pub fn inbox(&self) -> &XsdAnyUri {
|
||||
&self.inbox
|
||||
self.endpoints.shared_inbox.as_ref().unwrap_or(&self.inbox)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue