From e36b8d4fb94a35649fb9260786a56009906e5e22 Mon Sep 17 00:00:00 2001 From: Werner Kroneman Date: Tue, 26 Dec 2023 17:44:37 +0100 Subject: [PATCH] Exposed bound_jid on Agent. --- xmpp/src/agent.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xmpp/src/agent.rs b/xmpp/src/agent.rs index a0e20fa..7d0a2f1 100644 --- a/xmpp/src/agent.rs +++ b/xmpp/src/agent.rs @@ -104,4 +104,11 @@ impl Agent { pub async fn upload_file_with(&mut self, service: &str, path: &Path) { upload::send::upload_file_with(self, service, path).await } + + /// Get the bound jid of the client. + /// + /// If the client is not connected, this will be None. + pub fn bound_jid(&self) -> Option<&Jid> { + self.client.bound_jid() + } }