Update config.rs

This commit is contained in:
RustDesk 2025-05-23 22:06:46 +08:00 committed by GitHub
parent 0e279c1a8f
commit fa160b2864
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -951,6 +951,13 @@ impl Config {
config.key_pair
}
pub fn no_register_device() -> bool {
BUILTIN_SETTINGS.read().unwrap()
.get(keys::OPTION_REGISTER_DEVICE)
.map(|v| v == "N")
.unwrap_or(false)
}
pub fn get_id() -> String {
let mut id = CONFIG.read().unwrap().id.clone();
if id.is_empty() {