summaryrefslogtreecommitdiffstats
path: root/server/src/apub/community.rs
diff options
context:
space:
mode:
authorFelix <me@nutomic.com>2020-04-13 15:06:41 +0200
committerFelix <me@nutomic.com>2020-04-13 15:06:41 +0200
commitfdaf0b33642fec0e3e47b86cd7284b2fcea13ce9 (patch)
treed35aeb00bcae525aa860de9ec6b6aefadf5e7f28 /server/src/apub/community.rs
parentfac1cc7e1dc3b78aa48ae8c945c8c1cbd9e7fc9e (diff)
Get inbox working properly
Diffstat (limited to 'server/src/apub/community.rs')
-rw-r--r--server/src/apub/community.rs16
1 files changed, 13 insertions, 3 deletions
diff --git a/server/src/apub/community.rs b/server/src/apub/community.rs
index 36b9c703..a56d81d0 100644
--- a/server/src/apub/community.rs
+++ b/server/src/apub/community.rs
@@ -79,9 +79,9 @@ impl Community {
actor_props
.set_preferred_username(self.title.to_owned())?
- .set_inbox(format!("{}/inbox", &self.actor_id))?
- .set_outbox(format!("{}/outbox", &self.actor_id))?
- .set_followers(format!("{}/followers", &self.actor_id))?;
+ .set_inbox(self.get_inbox_url())?
+ .set_outbox(self.get_outbox_url())?
+ .set_followers(self.get_followers_url())?;
let public_key = PublicKey {
id: format!("{}#main-key", self.actor_id),
@@ -91,6 +91,16 @@ impl Community {
Ok(group.extend(actor_props).extend(public_key.to_ext()))
}
+
+ pub fn get_followers_url(&self) -> String {
+ format!("{}/followers", &self.actor_id)
+ }
+ pub fn get_inbox_url(&self) -> String {
+ format!("{}/inbox", &self.actor_id)
+ }
+ pub fn get_outbox_url(&self) -> String {
+ format!("{}/outbox", &self.actor_id)
+ }
}
impl CommunityForm {