powered by Jive Software

Help me with Occupant in MUC!

Firstly, I add myself in Roster of MUC when I display MUC’‘s Roster. The node of MUC’‘s Roster is the class org.jivesoftware.smackx.muc.Occupant. This class is only support for getter methods, but setter methods. Therefore, it’'s my problem when I want to add himself to the Roster of MUC when initializing Roster, because we cannot set attributes (jid, nick, affiliation, …) for new Occupant.

Tell me how to set for new Occupant or other solution in this case!

Thanks in advance!

to add your self to the MUC’'s roster you use MultiUserChat#join() or MultiUserChat#create

Sorry, I meant I want to getOccupant(mynick).

And, I got some problems, can you help me?

The first is that I cannot get RoomInfo.

The second is that I cannot getOccupant of myself with MUC.

For getting yourself you need to do getOccupant(roomname@hostname/nickname) because the function only accepts a jid. And what are you trying to do to get the roominfo?