no api for unregistered device

This commit is contained in:
rustdesk
2025-05-24 09:21:06 +08:00
parent 01146574f2
commit 777c25bba2
2 changed files with 4 additions and 2 deletions

View File

@@ -127,8 +127,7 @@ async fn start_hbbs_sync_async() {
// Though the username comparison is only necessary on Windows,
// we still keep the comparison on other platforms for consistency.
let need_upload = (!info_uploaded.uploaded || info_uploaded.username.as_ref() != Some(&sys_username)) &&
info_uploaded.last_uploaded.map(|x| x.elapsed() >= UPLOAD_SYSINFO_TIMEOUT).unwrap_or(true)
&& !Config::no_register_device();
info_uploaded.last_uploaded.map(|x| x.elapsed() >= UPLOAD_SYSINFO_TIMEOUT).unwrap_or(true);
if need_upload {
v["version"] = json!(crate::VERSION);
v["id"] = json!(id);