powered by Jive Software

Type list-single?

Hi,

I am trying to create a chatroom, and i try to use the property muc#roomconfig_maxusers, but the request type is list-single. What is this type ?

Thx

It’s the XMPP equivalent of:

In other words, a list of options is provided and the user picks one of the choices. (there’s also list-multi which allows you to select multiple choices)

ok thanks, but let’s say i want to create a chatroom limited to 100 users. How can i dot this ?

In my create chatroom method, i create a form and add the following line :

submitForm.setAnswer(“muc#roomconfig_maxusers”, ???);

When i replace ??? by 100 or “100”, i get an exception. What value should ??? have to create a chatroom limited to 100 users ?

Thx

I haven’t tried to set that property myself, but it seems like maybe an array list could work. That is how it is done for other options such as the room owners, as described in the “Create a new Room” example here:

http://www.igniterealtime.org/builds/smack/docs/latest/documentation/extensions/ index.html

List owners = new ArrayList();

  owners.add("johndoe@jabber.org");

submitForm.setAnswer(“muc#roomconfig_roomowners”, owners);

So perhaps a list with just one item.

Chris