forked from mirrors/relay
Do not prefer sharedinbox
This commit is contained in:
parent
3bfa2c0e45
commit
3389730242
1 changed files with 1 additions and 9 deletions
10
src/apub.rs
10
src/apub.rs
|
@ -81,17 +81,9 @@ 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()
|
||||||
|
@ -182,6 +174,6 @@ impl ValidObjects {
|
||||||
|
|
||||||
impl AcceptedActors {
|
impl AcceptedActors {
|
||||||
pub fn inbox(&self) -> &XsdAnyUri {
|
pub fn inbox(&self) -> &XsdAnyUri {
|
||||||
self.endpoints.shared_inbox.as_ref().unwrap_or(&self.inbox)
|
&self.inbox
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue