diff --git a/native/native_rust_library/src/backup.rs b/native/native_rust_library/src/backup.rs --- a/native/native_rust_library/src/backup.rs +++ b/native/native_rust_library/src/backup.rs @@ -245,7 +245,7 @@ .download_backup_data(&latest_backup_descriptor, RequestedData::BackupID) .await?; - let LatestBackupIDResponse { backup_id } = + let LatestBackupIDResponse { backup_id, .. } = serde_json::from_slice(&backup_id_response)?; let mut backup_key = compute_backup_key_str(&backup_secret, &backup_id)?; diff --git a/services/backup/src/database/backup_item.rs b/services/backup/src/database/backup_item.rs --- a/services/backup/src/database/backup_item.rs +++ b/services/backup/src/database/backup_item.rs @@ -187,6 +187,7 @@ pub created: DateTime, pub backup_id: String, pub user_keys: BlobInfo, + pub msg_backup: Option, } impl TryFrom> for OrderedBackupItem { @@ -213,11 +214,22 @@ value.remove(backup_table::attr::USER_KEYS), )?; + let msg_backup = value.remove(backup_table::attr::MSG_BACKUP); + let msg_backup = if msg_backup.is_some() { + Some(String::try_from_attr( + backup_table::attr::MSG_BACKUP, + msg_backup, + )?) + } else { + None + }; + Ok(OrderedBackupItem { user_id, created, backup_id, user_keys, + msg_backup, }) } } diff --git a/services/backup/src/http/handlers/backup.rs b/services/backup/src/http/handlers/backup.rs --- a/services/backup/src/http/handlers/backup.rs +++ b/services/backup/src/http/handlers/backup.rs @@ -291,6 +291,7 @@ let response = LatestBackupIDResponse { backup_id: backup_item.backup_id, + msg_backup: backup_item.msg_backup, }; Ok(web::Json(response)) diff --git a/shared/comm-lib/src/backup/mod.rs b/shared/comm-lib/src/backup/mod.rs --- a/shared/comm-lib/src/backup/mod.rs +++ b/shared/comm-lib/src/backup/mod.rs @@ -5,6 +5,9 @@ pub struct LatestBackupIDResponse { #[serde(rename = "backupID")] pub backup_id: String, + + #[serde(rename = "msgBackup")] + pub msg_backup: Option, } #[derive(Debug, Clone, Serialize, Deserialize)]