crypto: Expose the olm machine only if the encryption feature is enabled.
parent
ffd2843b0a
commit
f603696ff4
|
@ -1862,6 +1862,8 @@ impl BaseClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the olm machine.
|
/// Get the olm machine.
|
||||||
|
#[cfg(feature = "encryption")]
|
||||||
|
#[cfg_attr(feature = "docs", doc(cfg(encryption)))]
|
||||||
pub async fn olm_machine(&self) -> Option<OlmMachine> {
|
pub async fn olm_machine(&self) -> Option<OlmMachine> {
|
||||||
let olm = self.olm.lock().await;
|
let olm = self.olm.lock().await;
|
||||||
olm.as_ref().cloned()
|
olm.as_ref().cloned()
|
||||||
|
|
Loading…
Reference in New Issue