From 64c82ca0cf9de14c48500eed8a6b77bf530c8c94 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 18 Apr 2021 21:40:01 +0200 Subject: [PATCH] [muc] Add MultiUserChat.destroy() --- .../jivesoftware/smackx/muc/MultiUserChat.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java index bd70567fc..3ac7e0e94 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java @@ -923,6 +923,23 @@ public class MultiUserChat { connection.createStanzaCollectorAndSend(reg).nextResultOrThrow(); } + /** + * Sends a request to destroy the room. + * + * @throws XMPPErrorException if an error occurs while trying to destroy the room. + * An error can occur which will be wrapped by an XMPPException -- + * XMPP error code 403. The error code can be used to present more + * appropriate error messages to end-users. + * @throws NoResponseException if there was no response from the server. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @see #destroy(String, EntityBareJid) + * @since 4.5 + */ + public void destroy() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { + destroy(null, null); + } + /** * Sends a request to the server to destroy the room. The sender of the request * should be the room's owner. If the sender of the destroy request is not the room's owner