mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-07 15:33:45 -04:00
crypto: Expose the olm machine only if the encryption feature is enabled.
This commit is contained in:
@@ -1862,6 +1862,8 @@ impl BaseClient {
|
||||
}
|
||||
|
||||
/// Get the olm machine.
|
||||
#[cfg(feature = "encryption")]
|
||||
#[cfg_attr(feature = "docs", doc(cfg(encryption)))]
|
||||
pub async fn olm_machine(&self) -> Option<OlmMachine> {
|
||||
let olm = self.olm.lock().await;
|
||||
olm.as_ref().cloned()
|
||||
|
||||
Reference in New Issue
Block a user