sciter/mobile id suffix "\r" or "/r" for relay

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-02-26 11:23:43 +08:00
parent 8b3c4d3d64
commit 4b25291255
7 changed files with 38 additions and 13 deletions

View File

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