ParticipantStatusListener #joined(..) #kicked(...) not fired when is about myself! Is a Smack bug?

Hy,

The problem is that I can’t detect myself joining in MUC or beeing

previously within MUC#getOccupant(String userConferenceIdentifier)

After receving a inivitation to a MUC created by another user, theParticipantStatusListener#joined(String joinedUser) method isn’t fired

anyway…

If the MUC is created by me, or is a public conference on the server(OpenFire), the listener method is fired properly.

When join to the public MUC or to someone MUC, I use the same method based by MUC#join(nickName) and ofcourse, MUC#create(nickName) when I create the conference…

Also I can’t find myself in the MUC using getOccupant or getOccupantPresence

Can somebody show a pice of code that works for that purpose: detect if

I’m joined to the MUC or joining time when I call join method for a

conference made by one of my contacts?

The same problem for ParticipantStatusListener**#kicked(String kickedParticipant, String ownerName, String reason)**

When I’m participate into somebody MUC, and this contact kick me out, the kicked isn’t fired at all; the only thing that’s happening is receiving of a Presence Packet of Type.unavailable…

Maybe there is a Smack bug related to the notification that regards myself ???

Can please somebody explane me what’s the deal?

Thanks a lot,

Narcis.

When you are listening for MUC events, make sure you are attaching listeners early enough (before you call create or join) otherwise the packets will get to your client, but you will miss the callbacks. Having said that, I have found the listeners to be unreliable anyways and the only solution that seems to work everytime is to listen for the raw presence packets (See the Spark code for an example). You need to also be careful with the getOccupants() method because it is a single snapshot in time. Therefore, many times when you call it, the data may not be available yet for a few more milliseconds and it would not return what you would expect. As for the kick() method, I don’t have any suggestions because I haven’t used that feature.

Chris