From 28df82c7bd89fba4e675df844847381888ef5c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Mon, 27 Dec 2021 00:50:23 +0100 Subject: [PATCH] xmpp: disconnect method on Agent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- xmpp/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xmpp/src/lib.rs b/xmpp/src/lib.rs index 0f5b87a..7f0ee64 100644 --- a/xmpp/src/lib.rs +++ b/xmpp/src/lib.rs @@ -198,6 +198,10 @@ pub struct Agent { } impl Agent { + pub async fn disconnect(&mut self) -> Result<(), Error> { + self.client.send_end().await + } + pub async fn join_room( &mut self, room: BareJid,