summaryrefslogtreecommitdiffstats
path: root/server/src/apub/community.rs
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-04-24 22:34:51 -0400
committerDessalines <tyhou13@gmx.com>2020-04-24 22:34:51 -0400
commitb5a5b307a0bc6d920fa7418c6dc2e535380b3071 (patch)
treed9ee3619fa545e06d839cc7b4c44215f7702748a /server/src/apub/community.rs
parentdf9135f41042148e13cc3d9803dd935d1d11fb7a (diff)
Adding get_public_key_ext() to ActorType trait.
Diffstat (limited to 'server/src/apub/community.rs')
-rw-r--r--server/src/apub/community.rs12
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 {