rustdesk 2024-07-28 22:55:00 +08:00
parent 73f6afd4c0
commit fd9b5f3c57

View File

@ -2110,6 +2110,13 @@ impl LoginConfigHandler {
(my_id, self.id.clone())
};
let mut display_name = get_buildin_option(config::keys::OPTION_DISPLAY_NAME);
if display_name.is_empty() {
display_name = serde_json::from_str::<HashMap<String, String>>(
&LocalConfig::get_option("user_info"),
)
.map(|mut x| x.remove("name").unwrap_or_default())
.unwrap_or_default();
}
if display_name.is_empty() {
display_name = crate::username();
}