Do not start sync thread if user is disconnected

This commit is contained in:
2025-11-19 10:49:26 +01:00
parent 79d4482ea4
commit 5bf7c7f8df
2 changed files with 12 additions and 0 deletions

View File

@@ -298,6 +298,11 @@ impl MatrixClient {
Ok(())
}
/// Check whether a user is currently connected to this client or not
pub fn is_client_connected(&self) -> bool {
self.client.is_active()
}
/// Disconnect user from client
pub async fn disconnect(self) -> anyhow::Result<()> {
if let Err(e) = self.client.logout().await {