]> Untitled Git - lemmy.git/commitdiff
Remove unused fields on community/user json (#1178)
authorNutomic <me@nutomic.com>
Wed, 7 Oct 2020 18:19:12 +0000 (18:19 +0000)
committerGitHub <noreply@github.com>
Wed, 7 Oct 2020 18:19:12 +0000 (14:19 -0400)
lemmy_apub/src/community.rs
lemmy_apub/src/lib.rs
lemmy_apub/src/user.rs

index 715b765b3756b88aa667f9dd70c36293f9d96dcf..7ab65169974cba1c7985566a929df7029fc593c8 100644 (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()
index 3f37c5d3c036f423186fda03b7668f2b90a70d39..297bc5c9109ca953d400cecf04ecefac12f0c5db 100644 (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 {
index 60af834ca66856aec3b75ceb9b669c1a5bc5b1df..59db2b6a85bfcded6496a5bdaaaa2521a5ed27b6 100644 (file)
@@ -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());