powered by Jive Software

How to know when a MultiUserChat (MUC) has been destroyed?


How can I know when a MultiUserChat that I joined has been destroyed?

For a project here I have written an application that publishes information in a MultiUserChat which is created by another application. I want to know when the MultiUserChat has been destroyed so I can notify the user and do some clean up.

Any ideas? As I myself was unable to find a suitable listener or even an example demonstrating this.

Many thanks in advance for your time and help.

Kind regards,



It doesn’t appear appear that Openfire sends the muc#owner extension in the presence packet. What you do get is a presence packet to you, from the room, with a type of unavailable. This is the same packet you would get if you are removed from the room (e.g. by a moderator).

Edit: OpenFire includes a muc#user extension when a moderator removes a user.

<presence xml:lang=“en” id=“wenMU-34” to="test.acct_1@xmpp.xyz.com/TransVerse" from="myroom@conference.xmpp.xyz.com/test.acct_1" type=“unavailable”><priority>0</priority><x xmlns=“http://jabber.org/protocol/muc#user”><item jid="test.acct_1@xmpp.xyz.com/TransVerse" affiliation=“none” role=“none”><reason>You have been removed you from the room by a moderator.</reason><actor jid=“bill.smith@xmpp.xyz.coml”/></item><status code=“307”/></x></presence>


Hi Pony,

Thanks for your answering it helped me along.

However when I add UserStatusListener using SMACK I do not receive a callback when a room gets destroyed. I only get a callback when the application destroying the room, kicks the users in that room first. Then I receive a kicked() callback.

Is SMACK offering another listener that I should use instead of UserStatusListener?

Thanks and kind regards,


1 Like

[10 Year later…]
I am having the same issue. No callback to function roomDestroyed() in UserStatusListner. Any Suggestion ?