From ca09917d8452769a9b48db394c950ff3ee906ae7 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Tue, 20 Aug 2024 15:19:06 +0100 Subject: [PATCH] crypto: Update the comment about source of truth for in sqlite --- crates/matrix-sdk-sqlite/src/crypto_store.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/matrix-sdk-sqlite/src/crypto_store.rs b/crates/matrix-sdk-sqlite/src/crypto_store.rs index 3f0bb3091..7f3d68c6f 100644 --- a/crates/matrix-sdk-sqlite/src/crypto_store.rs +++ b/crates/matrix-sdk-sqlite/src/crypto_store.rs @@ -158,8 +158,10 @@ impl SqliteCryptoStore { ) -> Result { let mut pickle: PickledInboundGroupSession = self.deserialize_value(&value)?; - // backed_up SQL column is source of truth, backed_up field in pickle - // needed for other stores though + // The `backed_up` SQL column is the source of truth, because we update it + // inside `mark_inbound_group_sessions_as_backed_up` and don't update + // the pickled value inside the `data` column (until now, when we are puling it + // out of the DB). pickle.backed_up = backed_up; Ok(InboundGroupSession::from_pickle(pickle)?)