From db787c28b88669aed509e50fcf4bc8863aec12ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Tue, 21 Apr 2026 10:24:55 +0200 Subject: [PATCH] refactor(sdk-crypto): Fix several issues related to the newly enabled `experimental-push-secrets` feature --- crates/matrix-sdk-crypto/src/gossiping/machine.rs | 4 +++- crates/matrix-sdk-crypto/src/machine/mod.rs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/matrix-sdk-crypto/src/gossiping/machine.rs b/crates/matrix-sdk-crypto/src/gossiping/machine.rs index f6b858889..2f661a25d 100644 --- a/crates/matrix-sdk-crypto/src/gossiping/machine.rs +++ b/crates/matrix-sdk-crypto/src/gossiping/machine.rs @@ -1211,6 +1211,8 @@ impl GossipMachine { #[cfg(test)] mod tests { + #[cfg(feature = "experimental-push-secrets")] + use std::ops::Deref; use std::sync::Arc; #[cfg(feature = "automatic-room-key-forwarding")] @@ -2367,7 +2369,7 @@ mod tests { .unwrap() .unwrap(); - let decryption_key = crate::store::types::BackupDecryptionKey::new().unwrap(); + let decryption_key = crate::store::types::BackupDecryptionKey::new(); alice_machine .backup_machine() .save_decryption_key(Some(decryption_key.clone()), None) diff --git a/crates/matrix-sdk-crypto/src/machine/mod.rs b/crates/matrix-sdk-crypto/src/machine/mod.rs index 824054831..cd0d4a099 100644 --- a/crates/matrix-sdk-crypto/src/machine/mod.rs +++ b/crates/matrix-sdk-crypto/src/machine/mod.rs @@ -2024,7 +2024,8 @@ impl OlmMachine { /// Push a secret to all of our other verified devices. /// /// This function assumes that we already have Olm sessions with the other - /// devices. This can be done by calling [`get_missing_sessions()`]. + /// devices. This can be done by calling + /// [`OlmMachine::get_missing_sessions()`]. /// /// * `secret_name` - The name of the secret to push #[cfg(feature = "experimental-push-secrets")]