From d8b2097157990cd5a1fa52ad2de14ee6b7cecaf4 Mon Sep 17 00:00:00 2001 From: xsanm Date: Mon, 4 Nov 2024 11:08:25 +0100 Subject: [PATCH] [backup] add code comment to `UserKeys` definition explaining Olm account might be out of date Summary: [ENG-9705](https://linear.app/comm/issue/ENG-9705/add-code-comment-to-userkeys-definition-explaining-olm-account-might). Test Plan: N/A Reviewers: varun, bartek, ashoat Reviewed By: varun, ashoat Subscribers: tomek Differential Revision: https://phab.comm.dev/D13857 --- native/native_rust_library/src/backup.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/native/native_rust_library/src/backup.rs b/native/native_rust_library/src/backup.rs index 6a3da03e8d..54021cdc99 100644 --- a/native/native_rust_library/src/backup.rs +++ b/native/native_rust_library/src/backup.rs @@ -469,6 +469,12 @@ struct CompactionDownloadResult { backup_log_data_key: String, } +/// Stores the Olm account in `pickled_account`. However, Olm account +/// information might be out of date. We have decided we don't need +/// to update this when one-time keys (OTKs) or prekeys change. +/// The reasoning behind this decision is that the backed-up Olm account +/// is primarily used for signing an update to the device list. For these +/// operations only the identity signing key is necessary. #[derive(Debug, Serialize, Deserialize)] struct UserKeys { backup_data_key: String,