diff options
author | Dessalines <tyhou13@gmx.com> | 2020-04-14 19:18:13 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-04-14 19:18:13 -0400 |
commit | fcf1c65fc131478632525ce44a792f1578932f4a (patch) | |
tree | b778be542d06aa374fd5eb9d36b40b2b7fb05536 /server/src/api/community.rs | |
parent | 1336b4ed6023e7fcf0fd40be63569966ee4b1b45 (diff) |
Front end federation names and links for users, posts, and communities.
Diffstat (limited to 'server/src/api/community.rs')
-rw-r--r-- | server/src/api/community.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/server/src/api/community.rs b/server/src/api/community.rs index 35ca1d26..40d8afe3 100644 --- a/server/src/api/community.rs +++ b/server/src/api/community.rs @@ -1,9 +1,8 @@ use super::*; use crate::apub::activities::follow_community; -use crate::apub::{format_community_name, gen_keypair_str, make_apub_endpoint, EndpointType}; +use crate::apub::{gen_keypair_str, make_apub_endpoint, EndpointType}; use diesel::PgConnection; use std::str::FromStr; -use url::Url; #[derive(Serialize, Deserialize)] pub struct GetCommunity { @@ -144,7 +143,7 @@ impl Perform<GetCommunityResponse> for Oper<GetCommunity> { } }; - let mut community_view = match CommunityView::read(&conn, community.id, user_id) { + let community_view = match CommunityView::read(&conn, community.id, user_id) { Ok(community) => community, Err(_e) => return Err(APIError::err("couldnt_find_community").into()), }; @@ -160,12 +159,6 @@ impl Perform<GetCommunityResponse> for Oper<GetCommunity> { let creator_user = admins.remove(creator_index); admins.insert(0, creator_user); - if !community.local { - let domain = Url::parse(&community.actor_id)?; - community_view.name = - format_community_name(&community_view.name.to_string(), domain.host_str().unwrap()); - } - // Return the jwt Ok(GetCommunityResponse { community: community_view, |