From 6ed2ddf76da3f3e4a13c60c1c5278eae7bdb0ca2 Mon Sep 17 00:00:00 2001
From: figure-0e <133478007+figure-0e@users.noreply.github.com>
Date: Tue, 1 Aug 2023 02:40:42 -0600
Subject: [PATCH] Correct logic to meet join-lemmy requirement, don't have
 closed signups. Allows Open and Applications. (#3761)

Co-authored-by: Josh Bernardini <josh.bernardini@cologix.com>
---
 crates/routes/src/nodeinfo.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/crates/routes/src/nodeinfo.rs b/crates/routes/src/nodeinfo.rs
index f9df9412..736ab4e0 100644
--- a/crates/routes/src/nodeinfo.rs
+++ b/crates/routes/src/nodeinfo.rs
@@ -48,7 +48,9 @@ async fn node_info(context: web::Data<LemmyContext>) -> Result<HttpResponse, Err
   } else {
     None
   };
-  let open_registrations = Some(site_view.local_site.registration_mode == RegistrationMode::Open);
+  // Since there are 3 registration options,
+  // we need to set open_registrations as true if RegistrationMode is not Closed.
+  let open_registrations = Some(site_view.local_site.registration_mode != RegistrationMode::Closed);
   let json = NodeInfo {
     version: Some("2.0".to_string()),
     software: Some(NodeInfoSoftware {
-- 
2.44.1