Remove unused fields on community/user json (#1178)

pull/1182/head
Nutomic 2020-10-07 18:19:12 +00:00 committed by GitHub
parent f00cfa005e
commit 299598f0c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 19 deletions

View File

@ -109,8 +109,6 @@ impl ToApub for Community {
.set_preferred_username(self.title.to_owned())
.set_outbox(self.get_outbox_url()?)
.set_followers(self.get_followers_url()?)
.set_following(self.get_following_url().parse()?)
.set_liked(self.get_liked_url().parse()?)
.set_endpoints(Endpoints {
shared_inbox: Some(self.get_shared_inbox_url()?),
..Default::default()

View File

@ -292,14 +292,6 @@ pub trait ActorType {
Url::parse(&format!("{}/followers", &self.actor_id_str()))
}
fn get_following_url(&self) -> String {
format!("{}/following", &self.actor_id_str())
}
fn get_liked_url(&self) -> String {
format!("{}/liked", &self.actor_id_str())
}
fn get_public_key_ext(&self) -> Result<PublicKeyExtension, LemmyError> {
Ok(
PublicKey {

View File

@ -78,12 +78,7 @@ impl ToApub for User_ {
}
let mut ap_actor = ApActor::new(self.get_inbox_url()?, person);
ap_actor
.set_outbox(self.get_outbox_url()?)
.set_followers(self.get_followers_url()?)
.set_following(self.get_following_url().parse()?)
.set_liked(self.get_liked_url().parse()?)
.set_endpoints(Endpoints {
ap_actor.set_endpoints(Endpoints {
shared_inbox: Some(self.get_shared_inbox_url()?),
..Default::default()
});