From 10cf26918c806676c19f32e3d9ca051060bdc50c Mon Sep 17 00:00:00 2001 From: asonix Date: Tue, 17 Mar 2020 08:55:55 -0500 Subject: [PATCH] Add outbox url --- src/main.rs | 1 + src/state.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 5f9a00d..b805e34 100644 --- a/src/main.rs +++ b/src/main.rs @@ -50,6 +50,7 @@ async fn actor_route(state: web::Data) -> Result .set_followers(state.generate_url(UrlKind::Followers))? .set_following(state.generate_url(UrlKind::Following))? .set_inbox(state.generate_url(UrlKind::Inbox))? + .set_outbox(state.generate_url(UrlKind::Outbox))? .set_endpoints(endpoint)?; let public_key = PublicKey { diff --git a/src/state.rs b/src/state.rs index ec18dfa..edf4918 100644 --- a/src/state.rs +++ b/src/state.rs @@ -39,6 +39,7 @@ pub enum UrlKind { Following, Inbox, MainKey, + Outbox, } #[derive(Clone, Debug, thiserror::Error)] @@ -90,6 +91,7 @@ impl Settings { UrlKind::Following => format!("{}://{}/following", scheme, self.hostname), UrlKind::Inbox => format!("{}://{}/inbox", scheme, self.hostname), UrlKind::MainKey => format!("{}://{}/actor#main-key", scheme, self.hostname), + UrlKind::Outbox => format!("{}://{}/outbox", scheme, self.hostname), } }