From a1115d474bf0a92887d6939791a7129d25fcbbe7 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sat, 29 Jan 2022 17:18:29 +0100 Subject: [PATCH] Include `require_application` in crawl output --- src/crawl.rs | 2 ++ src/federated_instances.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/crawl.rs b/src/crawl.rs index 52a4b95..f522c71 100644 --- a/src/crawl.rs +++ b/src/crawl.rs @@ -64,6 +64,7 @@ pub struct InstanceDetails { pub users_active_month: i64, pub open_registrations: bool, pub linked_instances_count: i32, + pub require_application: bool, // The following fields are only used for aggregation, but not shown in output #[serde(skip)] pub linked_instances: Vec, @@ -135,6 +136,7 @@ async fn fetch_instance_details(domain: &str) -> Result users_active_month: node_info.usage.users.active_month, open_registrations: node_info.open_registrations, linked_instances_count: linked_instances.len() as i32, + require_application: site_info.site_view.site.require_application.unwrap_or(false), linked_instances, }) } diff --git a/src/federated_instances.rs b/src/federated_instances.rs index ea1948a..f1102a4 100644 --- a/src/federated_instances.rs +++ b/src/federated_instances.rs @@ -24,4 +24,5 @@ pub struct Site { pub name: String, pub icon: Option, pub description: Option, + pub require_application: Option }