powered by Jive Software

How to listen for messages like group destroyed, configuration changed etc

Whenever I tend to destroy a group, i get a message packet similar to

<message from='coven@muclight.shakespeare.lit'
    <x xmlns='urn:xmpp:muclight:0#affiliations'>
        <user affiliation='none'>crone1@shakespeare.lit</user>
    <x xmlns='urn:xmpp:muclight:0#destroy' />
    <body />

into smack debug logs, but none of my listeners listen to this sort of message, how do i listen for this sort of messages?

That is a job for a StanzaListener

In this particular case you would first create a StanzaFilter for messages with <{urn:xmpp:muclight:0#destroy}x/> extension elements and possibly with a given from address.

Then you register your listener using the filter with

XMPPConnection.add(Sync|Async)StanzaListener(StanzaListener, StanzaFilter)