diff options
Diffstat (limited to 'jabber/src/client.rs')
-rw-r--r-- | jabber/src/client.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/jabber/src/client.rs b/jabber/src/client.rs index f5d5dc7..2e59d98 100644 --- a/jabber/src/client.rs +++ b/jabber/src/client.rs @@ -26,6 +26,7 @@ use crate::{ pub struct JabberClient { connection: ConnectionState, jid: JID, + // TODO: have reconnection be handled by another part, so creds don't need to be stored in object password: Arc<SASLConfig>, server: String, } @@ -49,6 +50,10 @@ impl JabberClient { }) } + pub fn jid(&self) -> JID { + self.jid.clone() + } + pub async fn connect(&mut self) -> Result<()> { match &self.connection { ConnectionState::Disconnected => { |