Page MenuHomePhabricator

D13928.diff
No OneTemporary

D13928.diff

diff --git a/services/commtest/src/backup/backup_utils.rs b/services/commtest/src/backup/backup_utils.rs
--- a/services/commtest/src/backup/backup_utils.rs
+++ b/services/commtest/src/backup/backup_utils.rs
@@ -23,7 +23,7 @@
Some(predefined_byte_value),
)),
attachments: vec![],
- siwe_backup_msg: None,
+ siwe_backup_msg: Some("message".to_string()),
}
}
diff --git a/services/commtest/tests/backup_integration_test.rs b/services/commtest/tests/backup_integration_test.rs
--- a/services/commtest/tests/backup_integration_test.rs
+++ b/services/commtest/tests/backup_integration_test.rs
@@ -87,6 +87,7 @@
serde_json::from_slice(&backup_info_response)?;
assert_eq!(response.backup_id, backup_data.backup_id);
assert_eq!(response.user_id, device_info.user_id);
+ assert_eq!(response.siwe_backup_msg, backup_data.siwe_backup_msg);
let user_keys = backup_client
.download_backup_data(&latest_backup_descriptor, RequestedData::UserKeys)
diff --git a/services/commtest/tests/backup_upload_test.rs b/services/commtest/tests/backup_upload_test.rs
--- a/services/commtest/tests/backup_upload_test.rs
+++ b/services/commtest/tests/backup_upload_test.rs
@@ -50,6 +50,7 @@
assert_eq!(response.backup_id, backup_data.backup_id);
assert_eq!(response.user_id, device_info.user_id);
+ assert_eq!(response.siwe_backup_msg, backup_data.siwe_backup_msg);
let user_keys = backup_client
.download_backup_data(&latest_backup_descriptor, RequestedData::UserKeys)
@@ -236,6 +237,7 @@
assert_eq!(response.backup_id, new_user_keys.backup_id);
assert_eq!(response.user_id, device_info.user_id);
+ assert_eq!(response.siwe_backup_msg, backup_data.siwe_backup_msg);
// Test User Keys download -> should be updated
let backup_descriptor = BackupDescriptor::BackupID {
diff --git a/shared/backup_client/src/lib.rs b/shared/backup_client/src/lib.rs
--- a/shared/backup_client/src/lib.rs
+++ b/shared/backup_client/src/lib.rs
@@ -81,11 +81,10 @@
"user_data_hash",
Sha256::digest(&user_data_value).encode_hex::<String>(),
)
- .part("user_data", Part::stream(Body::from(user_data_value)));
+ .part("user_data", Part::stream(Body::from(user_data_value)))
+ .text("attachments", attachments.join("\n"));
}
- form = form.text("attachments", attachments.join("\n"));
-
if let Some(siwe_backup_msg_value) = siwe_backup_msg {
form = form.text("siwe_backup_msg", siwe_backup_msg_value);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 15, 5:37 PM (21 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2494934
Default Alt Text
D13928.diff (2 KB)

Event Timeline