From 19383fd28c097d2cd7dc4d0deab8291a72a20121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Sat, 11 Jan 2020 22:24:32 +0100 Subject: [PATCH] async_client: Add a method to fetch the homeserver. --- src/async_client.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/async_client.rs b/src/async_client.rs index 2901c3fc..0e01c1c0 100644 --- a/src/async_client.rs +++ b/src/async_client.rs @@ -160,10 +160,16 @@ impl AsyncClient { }) } + /// Is the client logged in. pub fn logged_in(&self) -> bool { self.base_client.read().unwrap().logged_in() } + /// The Homeserver of the client. + pub fn homeserver(&self) -> &Url { + &self.homeserver + } + pub fn add_event_callback( &mut self, mut callback: impl FnMut(Arc>, Arc>) -> C + 'static + Send,