mirror of
https://github.com/astro/buzzrelay.git
synced 2024-11-21 19:51:00 +00:00
actor: add a sharedInbox field
This commit is contained in:
parent
2db06d8e89
commit
70f66cbda3
2 changed files with 10 additions and 0 deletions
|
@ -12,12 +12,19 @@ pub struct Actor {
|
|||
pub icon: Option<Media>,
|
||||
pub inbox: String,
|
||||
pub outbox: Option<String>,
|
||||
pub endpoints: Option<ActorEndpoints>,
|
||||
#[serde(rename = "publicKey")]
|
||||
pub public_key: ActorPublicKey,
|
||||
#[serde(rename = "preferredUsername")]
|
||||
pub preferred_username: Option<String>,
|
||||
}
|
||||
|
||||
#[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,
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue