From 662620be4632656b2c6dcb32a440f0d11bb9bf6b Mon Sep 17 00:00:00 2001 From: asonix Date: Mon, 23 Jan 2023 08:29:32 -0600 Subject: [PATCH] Only show open_registrations: false when restricted mode is enabled --- src/routes/nodeinfo.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/nodeinfo.rs b/src/routes/nodeinfo.rs index a504496..66785e0 100644 --- a/src/routes/nodeinfo.rs +++ b/src/routes/nodeinfo.rs @@ -44,6 +44,8 @@ pub(crate) async fn route( .map(|s| s.to_owned()) .collect(); + let open_registrations = !config.restricted_mode(); + web::Json(NodeInfo { version: NodeInfoVersion, software: Software { @@ -55,7 +57,7 @@ pub(crate) async fn route( inbound: vec![], outbound: vec![], }, - open_registrations: false, + open_registrations, usage: Usage { users: Users { total: 1,