diff --git a/src/activitypub.rs b/src/activitypub.rs index 1f1417d..e77dd90 100644 --- a/src/activitypub.rs +++ b/src/activitypub.rs @@ -12,12 +12,19 @@ pub struct Actor { pub icon: Option, pub inbox: String, pub outbox: Option, + pub endpoints: Option, #[serde(rename = "publicKey")] pub public_key: ActorPublicKey, #[serde(rename = "preferredUsername")] pub preferred_username: Option, } +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ActorEndpoints { + #[serde(rename = "sharedInbox")] + pub shared_inbox: String, +} + #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ActorPublicKey { pub id: String, diff --git a/src/actor.rs b/src/actor.rs index ad8de30..f571d45 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -56,6 +56,9 @@ impl Actor { url: "https://fedi.buzz/assets/favicon48.png".to_string(), }), inbox: self.uri(), + endpoints: Some(activitypub::ActorEndpoints { + shared_inbox: format!("https://{}/instance/{}", self.host, self.host), + }), outbox: Some(format!("{}/outbox", self.uri())), public_key: activitypub::ActorPublicKey { id: self.key_id(),