]> Untitled Git - lemmy.git/commitdiff
Correct logic to meet join-lemmy requirement, don't have closed signups. Allows Open...
authorfigure-0e <133478007+figure-0e@users.noreply.github.com>
Tue, 1 Aug 2023 08:40:42 +0000 (02:40 -0600)
committerGitHub <noreply@github.com>
Tue, 1 Aug 2023 08:40:42 +0000 (10:40 +0200)
Co-authored-by: Josh Bernardini <josh.bernardini@cologix.com>
crates/routes/src/nodeinfo.rs

index f9df941220d080aed7b04c000587403c556c1df2..736ab4e046d49b1b9aba6b45a66d780ae13c2598 100644 (file)
@@ -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 {