powered by Jive Software

Determining chat messages originating from MUC

I can’‘t think of a way to differentiate between a normal chat message and a private chat message that is sent from an MUC participant to another participant- sorry if I am not describing this clearly, but this should clear it up… i’'m trying to differentiate between these jids for the from: field:



If I can’'t tell the difference between the two, then notification events in my client will say something like “Message received from conference,” since I am parsing the name from the jid.

If you are keeping track of the conferences you are participating you can check to see if the bare jid is in your list of conferences. If it is then you know because it contains a resource that it is a private chat with a participant of the multiuser chat.

Hope that helps


I thought about that, but a conference participant can still send a private chat message to a user who just left the conference if they already had a chat window open for that participant.

At this point, that may be my best option though- I was just hoping that there was a definite way to differentiate between the two.

If a person is not in a conference room, they just left or never joined, they should not be able to recieve private messages from people inside of the chat room. Just don’'t remove the conference room from your list before you recieve the confirmation packet for you leaving the conference room from the server.


You’‘re right. It was my fault for not testing it out before I came to that conclusion. I just tested it and I couldn’'t send the message to a user who just left the conference room.

Thanks again for your help Alex.