mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-05-01 03:44:12 -04:00
feat: add and update device_slug field handling in LibraryMessage
This commit is contained in:
@@ -181,7 +181,7 @@ impl LibrarySyncSetupAction {
|
||||
id: sea_orm::ActiveValue::NotSet,
|
||||
uuid: Set(self.input.remote_device_id),
|
||||
name: Set(remote_device_info.device_name.clone()),
|
||||
slug: Set(crate::domain::device::Device::generate_slug(&remote_device_info.device_name)),
|
||||
slug: Set(remote_device_info.device_slug.clone()),
|
||||
os: Set(device_os.to_string()),
|
||||
os_version: Set(Some(remote_device_info.os_version.clone())),
|
||||
hardware_model: Set(None), // Not available in DeviceInfo
|
||||
@@ -230,6 +230,7 @@ impl LibrarySyncSetupAction {
|
||||
library_id: self.input.remote_library_id,
|
||||
device_id: self.input.local_device_id,
|
||||
device_name: local_device_config.name.clone(),
|
||||
device_slug: local_device_config.slug.clone(),
|
||||
os_name: local_device_config.os.to_string(),
|
||||
os_version: None, // Not available in DeviceConfig
|
||||
hardware_model: local_device_config.hardware_model.clone(),
|
||||
|
||||
@@ -23,6 +23,7 @@ pub enum LibraryMessage {
|
||||
library_id: Option<Uuid>, // None means register in all libraries
|
||||
device_id: Uuid,
|
||||
device_name: String,
|
||||
device_slug: String,
|
||||
os_name: String,
|
||||
os_version: Option<String>,
|
||||
hardware_model: Option<String>,
|
||||
|
||||
@@ -210,6 +210,7 @@ impl MessagingProtocolHandler {
|
||||
library_id,
|
||||
device_id,
|
||||
device_name,
|
||||
device_slug,
|
||||
os_name,
|
||||
os_version,
|
||||
hardware_model,
|
||||
@@ -262,7 +263,7 @@ impl MessagingProtocolHandler {
|
||||
id: sea_orm::ActiveValue::NotSet,
|
||||
uuid: Set(device_id),
|
||||
name: Set(device_name.clone()),
|
||||
slug: Set(crate::domain::device::Device::generate_slug(&device_name)),
|
||||
slug: Set(device_slug.clone()),
|
||||
os: Set(os_name.clone()),
|
||||
os_version: Set(os_version.clone()),
|
||||
hardware_model: Set(hardware_model.clone()),
|
||||
|
||||
Reference in New Issue
Block a user