powered by Jive Software



I am having a problem using muc.getSubject(). My chatroom has a subject, but the method returns me “null”. Do i need to have a SubjectChangedListener only to get my getSubject working ?

I do not care about the change of the subject, it is not meant to be changed. So i only want to display the subject of the chatroom when i join it, and it doesn’'t work.

thanx in advance

Maybe you’‘re calling getSubject() before you’'ve finished joining the room? An alternate method would be MultiUserChat.getRoomInfo(XMPPConnection conn, String room).getSubject() (works for public rooms only).

If the room isn’'t public, you may need to use a listener to diplay the subject once your connection to the room is complete. You could also check in a loop using MultiUserChat.isJoined(), but the listener method would be cleaner.

Message was edited by: bemace