Add outbox url

This commit is contained in:
asonix 2020-03-17 08:55:55 -05:00
parent ea64843a59
commit 10cf26918c
2 changed files with 3 additions and 0 deletions

View file

@ -50,6 +50,7 @@ async fn actor_route(state: web::Data<State>) -> Result<impl Responder, MyError>
.set_followers(state.generate_url(UrlKind::Followers))? .set_followers(state.generate_url(UrlKind::Followers))?
.set_following(state.generate_url(UrlKind::Following))? .set_following(state.generate_url(UrlKind::Following))?
.set_inbox(state.generate_url(UrlKind::Inbox))? .set_inbox(state.generate_url(UrlKind::Inbox))?
.set_outbox(state.generate_url(UrlKind::Outbox))?
.set_endpoints(endpoint)?; .set_endpoints(endpoint)?;
let public_key = PublicKey { let public_key = PublicKey {

View file

@ -39,6 +39,7 @@ pub enum UrlKind {
Following, Following,
Inbox, Inbox,
MainKey, MainKey,
Outbox,
} }
#[derive(Clone, Debug, thiserror::Error)] #[derive(Clone, Debug, thiserror::Error)]
@ -90,6 +91,7 @@ impl Settings {
UrlKind::Following => format!("{}://{}/following", scheme, self.hostname), UrlKind::Following => format!("{}://{}/following", scheme, self.hostname),
UrlKind::Inbox => format!("{}://{}/inbox", scheme, self.hostname), UrlKind::Inbox => format!("{}://{}/inbox", scheme, self.hostname),
UrlKind::MainKey => format!("{}://{}/actor#main-key", scheme, self.hostname), UrlKind::MainKey => format!("{}://{}/actor#main-key", scheme, self.hostname),
UrlKind::Outbox => format!("{}://{}/outbox", scheme, self.hostname),
} }
} }