From: figure-0e <133478007+figure-0e@users.noreply.github.com>
Date: Tue, 1 Aug 2023 08:40:42 +0000 (-0600)
Subject: Correct logic to meet join-lemmy requirement, don't have closed signups. Allows Open... 
X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/README.md?a=commitdiff_plain;h=6ed2ddf76da3f3e4a13c60c1c5278eae7bdb0ca2;p=lemmy.git

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>
---

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 {