diff options
Diffstat (limited to 'server/src/apub/community.rs')
-rw-r--r-- | server/src/apub/community.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/server/src/apub/community.rs b/server/src/apub/community.rs index 05e004ee..e74a5fd1 100644 --- a/server/src/apub/community.rs +++ b/server/src/apub/community.rs @@ -38,13 +38,7 @@ impl ToApub for Community { .set_outbox(self.get_outbox_url())? .set_followers(self.get_followers_url())?; - let public_key = PublicKey { - id: format!("{}#main-key", self.actor_id), - owner: self.actor_id.to_owned(), - public_key_pem: self.public_key.to_owned().unwrap(), - }; - - Ok(group.extend(actor_props).extend(public_key.to_ext())) + Ok(group.extend(actor_props).extend(self.get_public_key_ext())) } } @@ -52,6 +46,10 @@ impl ActorType for Community { fn actor_id(&self) -> String { self.actor_id.to_owned() } + + fn public_key(&self) -> String { + self.public_key.to_owned().unwrap() + } } impl FromApub for CommunityForm { |