diff --git a/crates/matrix-sdk/src/encryption/mod.rs b/crates/matrix-sdk/src/encryption/mod.rs index d7db4d095e3..234d9c0d4a3 100644 --- a/crates/matrix-sdk/src/encryption/mod.rs +++ b/crates/matrix-sdk/src/encryption/mod.rs @@ -1407,6 +1407,15 @@ impl Encryption { } } + /// Upload the device keys and initial set of one-tim keys to the server. + /// + /// This should only be called when the user logs in for the first time, + /// the method will ensure that other devices see our own device as an + /// end-to-end encryption enabled one. + /// + /// **Warning**: Do not use this method if we're already calling + /// [`Client::send_outgoing_request()`]. This method is intended for + /// explicitly uploading the device keys before starting a sync. #[cfg(feature = "experimental-oidc")] pub(crate) async fn ensure_device_keys_upload(&self) -> Result<()> { let olm = self.client.olm_machine().await;