Merge pull request #3727 from fufesou/refact/peer_info_platform_additions

better peer info
This commit is contained in:
RustDesk 2023-03-21 13:26:37 +08:00 committed by GitHub
commit 759092c545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -843,14 +843,15 @@ impl Connection {
pi.hostname = DEVICE_NAME.lock().unwrap().clone();
pi.platform = "Android".into();
}
let mut platform_additions = serde_json::Map::new();
#[cfg(target_os = "linux")]
{
pi.platform_additions = format!(r#"
{{
"is_wayland": {}
}}
"#, crate::platform::current_is_wayland());
if crate::platform::current_is_wayland() {
platform_additions.insert("is_wayland".into(), json!(true));
}
}
if !platform_additions.is_empty() {
pi.platform_additions = serde_json::to_string(&platform_additions).unwrap_or("".into());
}
#[cfg(feature = "hwcodec")]