diff --git a/server/lemmy_utils/src/settings.rs b/server/lemmy_utils/src/settings.rs index b58d1cebb..55b6cbb32 100644 --- a/server/lemmy_utils/src/settings.rs +++ b/server/lemmy_utils/src/settings.rs @@ -141,6 +141,7 @@ impl Settings { .map(|d| d.to_string()) .collect(); + // The defaults.hjson config always returns a [""] allowed_instances.retain(|d| !d.eq("")); allowed_instances diff --git a/server/src/api/site.rs b/server/src/api/site.rs index 0866b7904..515c3e5be 100644 --- a/server/src/api/site.rs +++ b/server/src/api/site.rs @@ -130,7 +130,7 @@ pub struct GetSiteResponse { pub online: usize, version: String, my_user: Option, - allowed_instances: Vec, + federated_instances: Vec, } #[derive(Serialize, Deserialize)] @@ -434,7 +434,7 @@ impl Perform for Oper { online, version: version::VERSION.to_string(), my_user, - allowed_instances: Settings::get().get_allowed_instances(), + federated_instances: Settings::get().get_allowed_instances(), }) } } @@ -661,7 +661,7 @@ impl Perform for Oper { online: 0, version: version::VERSION.to_string(), my_user: Some(user), - allowed_instances: Settings::get().get_allowed_instances(), + federated_instances: Settings::get().get_allowed_instances(), }) } } diff --git a/ui/src/components/admin-settings.tsx b/ui/src/components/admin-settings.tsx index 27970864d..fe50b1e94 100644 --- a/ui/src/components/admin-settings.tsx +++ b/ui/src/components/admin-settings.tsx @@ -48,7 +48,7 @@ export class AdminSettings extends Component { banned: [], online: null, version: null, - allowed_instances: null, + federated_instances: null, }, siteConfigForm: { config_hjson: null, diff --git a/ui/src/components/instances.tsx b/ui/src/components/instances.tsx index 48eb69686..ae4e3f13b 100644 --- a/ui/src/components/instances.tsx +++ b/ui/src/components/instances.tsx @@ -63,9 +63,9 @@ export class Instances extends Component {
{i18n.t('linked_instances')}
{this.state.siteRes && - this.state.siteRes.allowed_instances.length ? ( + this.state.siteRes.federated_instances.length ? (