Do not prefer sharedinbox

This commit is contained in:
asonix 2020-03-22 22:57:54 -05:00
parent 3bfa2c0e45
commit 3389730242

View file

@ -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
} }
} }