From: Nutomic Date: Wed, 7 Oct 2020 18:19:12 +0000 (+0000) Subject: Remove unused fields on community/user json (#1178) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%24%7B%60data:application/%22https:/hacktivis.me/README.zh.hant.md?a=commitdiff_plain;h=299598f0c43b105b115fd23ff682b5a77e23e005;p=lemmy.git Remove unused fields on community/user json (#1178) --- diff --git a/lemmy_apub/src/community.rs b/lemmy_apub/src/community.rs index 715b765b..7ab65169 100644 --- a/lemmy_apub/src/community.rs +++ b/lemmy_apub/src/community.rs @@ -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() diff --git a/lemmy_apub/src/lib.rs b/lemmy_apub/src/lib.rs index 3f37c5d3..297bc5c9 100644 --- a/lemmy_apub/src/lib.rs +++ b/lemmy_apub/src/lib.rs @@ -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 { Ok( PublicKey { diff --git a/lemmy_apub/src/user.rs b/lemmy_apub/src/user.rs index 60af834c..59db2b6a 100644 --- a/lemmy_apub/src/user.rs +++ b/lemmy_apub/src/user.rs @@ -78,15 +78,10 @@ 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 { - shared_inbox: Some(self.get_shared_inbox_url()?), - ..Default::default() - }); + ap_actor.set_endpoints(Endpoints { + shared_inbox: Some(self.get_shared_inbox_url()?), + ..Default::default() + }); if let Some(i) = &self.preferred_username { ap_actor.set_preferred_username(i.to_owned());