From 06cb49ec71be4d1a9c499c2b8ef80c472c2742eb Mon Sep 17 00:00:00 2001 From: rustdesk Date: Thu, 30 May 2024 14:27:47 +0800 Subject: [PATCH] preset-address-book-name preset-address-book-tag https://github.com/rustdesk/rustdesk-server-pro/issues/257 --- src/hbbs_http/sync.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hbbs_http/sync.rs b/src/hbbs_http/sync.rs index 8cf925434..b54d84cc2 100644 --- a/src/hbbs_http/sync.rs +++ b/src/hbbs_http/sync.rs @@ -80,6 +80,14 @@ async fn start_hbbs_sync_async() { v["version"] = json!(crate::VERSION); v["id"] = json!(id); v["uuid"] = json!(crate::encode64(hbb_common::get_uuid())); + let ab_name = Config::get_option("preset-address-book-name"); + if !ab_name.is_empty() { + v["preset-address-book-name"] = json!(ab_name); + } + let ab_tag = Config::get_option("preset-address-book-tag"); + if !ab_tag.is_empty() { + v["preset-address-book-tag"] = json!(ab_tag); + } match crate::post_request(url.replace("heartbeat", "sysinfo"), v.to_string(), "").await { Ok(x) => { if x == "SYSINFO_UPDATED" {