mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
style: Fix failing lints
This commit is contained in:
@@ -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)) =
|
||||||
|
|||||||
@@ -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.")));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user