Skip to content

Commit

Permalink
fixup! Add a method to ensure device keys are uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
poljar committed May 27, 2024
1 parent deb8800 commit 008a33d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/matrix-sdk/src/encryption/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 008a33d

Please sign in to comment.