style: Fix failing lints

This commit is contained in:
timedout
2026-01-05 20:10:29 +00:00
committed by Jade Ellis
parent 006c57face
commit 279f7cbfe4
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -346,7 +346,7 @@ pub async fn join_room_by_id_helper(
{ {
warn!("Antispam prevented user {} from joining room {}: {}", sender_user, room_id, e); warn!("Antispam prevented user {} from joining room {}: {}", sender_user, room_id, e);
return Err!(Request(Forbidden("Antispam rejected join request."))); return Err!(Request(Forbidden("Antispam rejected join request.")));
}; }
} }
if server_in_room { if server_in_room {
@@ -786,7 +786,7 @@ async fn join_room_by_id_helper_local(
} }
}, },
| _ => {}, | _ => {},
}; }
let join_authorized_via_users_server = if restricted_join_authorized.is_none() { let join_authorized_via_users_server = if restricted_join_authorized.is_none() {
None None
} else { } else {
@@ -848,7 +848,7 @@ async fn join_room_by_id_helper_local(
warn!( warn!(
?error, ?error,
remote_servers = %servers.len()-1, servers = %servers.len(),
"Could not join restricted room locally, attempting remote join", "Could not join restricted room locally, attempting remote join",
); );
let Ok((make_join_response, remote_server)) = let Ok((make_join_response, remote_server)) =
+2 -1
View File
@@ -123,10 +123,11 @@ pub(crate) async fn create_join_event_template_route(
} }
}; };
if services.antispam.check_all_joins() && join_authorized_via_users_server.is_none() { if services.antispam.check_all_joins() && join_authorized_via_users_server.is_none() {
if let Err(_) = services if services
.antispam .antispam
.meowlnir_accept_make_join(body.room_id.clone(), body.user_id.clone()) .meowlnir_accept_make_join(body.room_id.clone(), body.user_id.clone())
.await .await
.is_err()
{ {
return Err!(Request(Forbidden("Antispam rejected join request."))); return Err!(Request(Forbidden("Antispam rejected join request.")));
} }