Revert "Do not prefer sharedinbox"

This reverts commit 3389730242.
This commit is contained in:
asonix 2020-03-23 11:00:12 -05:00
parent 3389730242
commit f44df38ea1

View file

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