Do not start sync thread if user is disconnected
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user