This commit is contained in:
2026-05-31 15:40:00 +01:00
parent 10a32423ea
commit 585d642204
2 changed files with 3 additions and 9 deletions
BIN
View File
Binary file not shown.
+2 -8
View File
@@ -377,17 +377,11 @@ async fn handle_socket
}; };
let name: Arc<str> = match name.expect("failed to recv socket msg") let name: Arc<str> = match name.expect("failed to recv socket msg")
{ {
Message::Text(text) => Message::Text(text)
{ if validate_name(&text.to_string()) =>
if validate_name(&text)
{ {
Arc::from(text.to_string().into_boxed_str()) Arc::from(text.to_string().into_boxed_str())
} }
else
{
Arc::from("anon")
}
}
_ => Arc::from("anon"), _ => Arc::from("anon"),
}; };