mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 19:31:33 +00:00
Remove unused fields on community/user json (#1178)
This commit is contained in:
parent
f00cfa005e
commit
299598f0c4
3 changed files with 4 additions and 19 deletions
|
@ -109,8 +109,6 @@ impl ToApub for Community {
|
||||||
.set_preferred_username(self.title.to_owned())
|
.set_preferred_username(self.title.to_owned())
|
||||||
.set_outbox(self.get_outbox_url()?)
|
.set_outbox(self.get_outbox_url()?)
|
||||||
.set_followers(self.get_followers_url()?)
|
.set_followers(self.get_followers_url()?)
|
||||||
.set_following(self.get_following_url().parse()?)
|
|
||||||
.set_liked(self.get_liked_url().parse()?)
|
|
||||||
.set_endpoints(Endpoints {
|
.set_endpoints(Endpoints {
|
||||||
shared_inbox: Some(self.get_shared_inbox_url()?),
|
shared_inbox: Some(self.get_shared_inbox_url()?),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
|
@ -292,14 +292,6 @@ pub trait ActorType {
|
||||||
Url::parse(&format!("{}/followers", &self.actor_id_str()))
|
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> {
|
fn get_public_key_ext(&self) -> Result<PublicKeyExtension, LemmyError> {
|
||||||
Ok(
|
Ok(
|
||||||
PublicKey {
|
PublicKey {
|
||||||
|
|
|
@ -78,15 +78,10 @@ impl ToApub for User_ {
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut ap_actor = ApActor::new(self.get_inbox_url()?, person);
|
let mut ap_actor = ApActor::new(self.get_inbox_url()?, person);
|
||||||
ap_actor
|
ap_actor.set_endpoints(Endpoints {
|
||||||
.set_outbox(self.get_outbox_url()?)
|
shared_inbox: Some(self.get_shared_inbox_url()?),
|
||||||
.set_followers(self.get_followers_url()?)
|
..Default::default()
|
||||||
.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()
|
|
||||||
});
|
|
||||||
|
|
||||||
if let Some(i) = &self.preferred_username {
|
if let Some(i) = &self.preferred_username {
|
||||||
ap_actor.set_preferred_username(i.to_owned());
|
ap_actor.set_preferred_username(i.to_owned());
|
||||||
|
|
Loading…
Reference in a new issue