diff --git a/crates/matrix-sdk-crypto/src/olm/account.rs b/crates/matrix-sdk-crypto/src/olm/account.rs index 8614faf545c..e7e957b8a82 100644 --- a/crates/matrix-sdk-crypto/src/olm/account.rs +++ b/crates/matrix-sdk-crypto/src/olm/account.rs @@ -464,7 +464,7 @@ impl Account { } /// Generate count number of one-time keys. - pub fn generate_one_time_keys_helper(&mut self, count: usize) -> OneTimeKeyGenerationResult { + pub fn generate_one_time_keys(&mut self, count: usize) -> OneTimeKeyGenerationResult { self.inner.generate_one_time_keys(count) } @@ -531,7 +531,7 @@ impl Account { let key_count = (max_keys as u64) - count; let key_count: usize = key_count.try_into().unwrap_or(max_keys); - let result = self.generate_one_time_keys_helper(key_count); + let result = self.generate_one_time_keys(key_count); debug!( count = key_count, @@ -986,7 +986,7 @@ impl Account { ) -> (Session, Session) { use ruma::events::dummy::ToDeviceDummyEventContent; - other.generate_one_time_keys_helper(1); + other.generate_one_time_keys(1); let one_time_map = other.signed_one_time_keys(); let device = ReadOnlyDevice::from_account(other); diff --git a/crates/matrix-sdk-crypto/src/olm/mod.rs b/crates/matrix-sdk-crypto/src/olm/mod.rs index c7c2a923895..4e09600d3dd 100644 --- a/crates/matrix-sdk-crypto/src/olm/mod.rs +++ b/crates/matrix-sdk-crypto/src/olm/mod.rs @@ -85,7 +85,7 @@ pub(crate) mod tests { let alice = Account::with_device_id(alice_id(), alice_device_id()); let mut bob = Account::with_device_id(bob_id(), bob_device_id()); - bob.generate_one_time_keys_helper(1); + bob.generate_one_time_keys(1); let one_time_key = *bob.one_time_keys().values().next().unwrap(); let sender_key = bob.identity_keys().curve25519; let session = alice.create_outbound_session_helper( @@ -116,7 +116,7 @@ pub(crate) mod tests { assert!(!one_time_keys.is_empty()); assert_ne!(account.max_one_time_keys(), 0); - account.generate_one_time_keys_helper(10); + account.generate_one_time_keys(10); let one_time_keys = account.one_time_keys(); assert_ne!(one_time_keys.values().len(), 0); @@ -133,7 +133,7 @@ pub(crate) mod tests { let mut alice = Account::with_device_id(alice_id(), alice_device_id()); let bob = Account::with_device_id(bob_id(), bob_device_id()); let alice_keys = alice.identity_keys(); - alice.generate_one_time_keys_helper(1); + alice.generate_one_time_keys(1); let one_time_keys = alice.one_time_keys(); alice.mark_keys_as_published(); diff --git a/crates/matrix-sdk-crypto/src/session_manager/sessions.rs b/crates/matrix-sdk-crypto/src/session_manager/sessions.rs index bf005cad65c..e81f32ded10 100644 --- a/crates/matrix-sdk-crypto/src/session_manager/sessions.rs +++ b/crates/matrix-sdk-crypto/src/session_manager/sessions.rs @@ -718,7 +718,7 @@ mod tests { assert!(request.one_time_keys.contains_key(bob.user_id())); - bob.generate_one_time_keys_helper(1); + bob.generate_one_time_keys(1); let one_time = bob.signed_one_time_keys(); assert!(!one_time.is_empty()); bob.mark_keys_as_published(); @@ -882,7 +882,7 @@ mod tests { assert!(request.one_time_keys.contains_key(bob.user_id())); - bob.generate_one_time_keys_helper(1); + bob.generate_one_time_keys(1); let one_time = bob.signed_one_time_keys(); assert!(!one_time.is_empty()); bob.mark_keys_as_published(); @@ -1009,7 +1009,7 @@ mod tests { // Since alice is timed out, we won't claim keys for her. assert!(manager.get_missing_sessions(iter::once(alice)).await.unwrap().is_none()); - alice_account.generate_one_time_keys_helper(1); + alice_account.generate_one_time_keys(1); let one_time = alice_account.signed_one_time_keys(); assert!(!one_time.is_empty()); diff --git a/crates/matrix-sdk-crypto/src/store/integration_tests.rs b/crates/matrix-sdk-crypto/src/store/integration_tests.rs index fe940ff27d8..73905a4a6e8 100644 --- a/crates/matrix-sdk-crypto/src/store/integration_tests.rs +++ b/crates/matrix-sdk-crypto/src/store/integration_tests.rs @@ -79,7 +79,7 @@ macro_rules! cryptostore_integration_tests { let alice = Account::with_device_id(alice_id(), alice_device_id()); let mut bob = Account::with_device_id(bob_id(), bob_device_id()); - bob.generate_one_time_keys_helper(1); + bob.generate_one_time_keys(1); let one_time_key = *bob.one_time_keys().values().next().unwrap(); let sender_key = bob.identity_keys().curve25519; let session = alice diff --git a/crates/matrix-sdk/src/sliding_sync/mod.rs b/crates/matrix-sdk/src/sliding_sync/mod.rs index d5f44ce7b70..96c090546e8 100644 --- a/crates/matrix-sdk/src/sliding_sync/mod.rs +++ b/crates/matrix-sdk/src/sliding_sync/mod.rs @@ -626,7 +626,7 @@ impl SlidingSync { let client = self.inner.client.clone(); let e2ee_uploads = spawn(async move { if let Err(error) = client.send_outgoing_requests().await { - error!(?error, "Error while sending outoging E2EE requests"); + error!(?error, "Error while sending outgoing E2EE requests"); } }) // Ensure that the task is not running in detached mode. It is aborted when it's