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>
This commit is contained in:
figure-0e 2023-08-01 02:40:42 -06:00 committed by GitHub
parent 963d04b352
commit 6ed2ddf76d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,7 +48,9 @@ async fn node_info(context: web::Data<LemmyContext>) -> Result<HttpResponse, Err
} else { } else {
None 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 { let json = NodeInfo {
version: Some("2.0".to_string()), version: Some("2.0".to_string()),
software: Some(NodeInfoSoftware { software: Some(NodeInfoSoftware {