From 164084fcb12536a1dbd2c6eccbe8d6d2291519a1 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 13 May 2024 15:09:44 +0200 Subject: [PATCH] Add mandatory fields --- crates/routes/src/nodeinfo.rs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/crates/routes/src/nodeinfo.rs b/crates/routes/src/nodeinfo.rs index d3d66c8c0..665756864 100644 --- a/crates/routes/src/nodeinfo.rs +++ b/crates/routes/src/nodeinfo.rs @@ -47,10 +47,12 @@ async fn node_info(context: web::Data) -> Result) -> Result>, pub usage: Option, pub open_registrations: Option, + /// These fields are required by the spec for no reason + pub services: Option, + pub metadata: Option>, } #[derive(Serialize, Deserialize, Debug, Default)] @@ -94,6 +105,8 @@ pub struct NodeInfo { pub struct NodeInfoSoftware { pub name: Option, pub version: Option, + pub repository: Option, + pub homepage: Option, } #[derive(Serialize, Deserialize, Debug, Default)] @@ -111,3 +124,10 @@ pub struct NodeInfoUsers { pub active_halfyear: Option, pub active_month: Option, } + +#[derive(Serialize, Deserialize, Debug, Default)] +#[serde(rename_all = "camelCase", default)] +pub struct NodeInfoServices { + pub inbound: Option>, + pub outbound: Option>, +}