Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3339196
D11734.id39391.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11734.id39391.diff
View Options
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<Utc>,
pub backup_id: String,
pub user_keys: BlobInfo,
+ pub msg_backup: Option<String>,
}
impl TryFrom<HashMap<String, AttributeValue>> 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<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 7:00 PM (17 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2564329
Default Alt Text
D11734.id39391.diff (2 KB)
Attached To
Mode
D11734: Introduce 'msgBackup' field to 'OrderedBackupItem' and 'LatestBackupIDResponse'
Attached
Detach File
Event Timeline
Log In to Comment