This commit is contained in:
rustdesk
2023-11-06 20:12:01 +08:00
parent 679a026e72
commit d7e8d4d5c3
64 changed files with 1193 additions and 1082 deletions

View File

@@ -1256,9 +1256,9 @@ async fn check_id(
}
// if it's relay id, return id processed, otherwise return original id
pub fn handle_relay_id(id: String) -> String {
pub fn handle_relay_id(id: &str) -> &str {
if id.ends_with(r"\r") || id.ends_with(r"/r") {
id[0..id.len() - 2].to_string()
&id[0..id.len() - 2]
} else {
id
}