[muc] Add MultiUserChat.destroy()

This commit is contained in:
Florian Schmaus 2021-04-18 21:40:01 +02:00
parent c95c8264da
commit 64c82ca0cf
1 changed files with 17 additions and 0 deletions

View File

@ -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