Hello all,
another question.
I create a persistent room with no problem…when I try to create a non persistent room, it is created ok but when another user tries to join I get a 404 error. Cant figure out how to “unlock” the room.
Here is my code for creating the room:
public void createMultiUserChat(Object conn,String room_name)
{
try
{
XMPPConnection connx = (XMPPConnection) conn;
System.out.println(connx.getUser());
String user = connx.getUser().substring(0,connx.getUser().indexOf("@"));
MultiUserChat muc = new MultiUserChat(connx,room_name+CONFERENCE_SERVICE_NAME);
muc.create(user);
Form form = muc.getConfigurationForm();
Form newForm = form.createAnswerForm();
for (Iterator fields = form.getFields(); fields.hasNext()
{
FormField field = (FormField) fields.next();
if (!FormField.TYPE_HIDDEN.equals(field.getType()) && field.getVariable() != null)
{
// Sets the default value as the answer
newForm.setDefaultAnswer(field.getVariable());
}
}
newForm.setAnswer(“muc#roomconfig_publicroom”,true);
newForm.setAnswer(“muc#roomconfig_passwordprotectedroom”,false);
newForm.setAnswer(“x-muc#roomconfig_registration”,false);
newForm.setAnswer(“muc#roomconfig_persistentroom”,true); //IF I SET THIS TO FALSE, I GET THE 404.
newForm.setAnswer(“muc#roomconfig_enablelogging”,true);
// newForm.setAnswer(“muc#roomconfig_maxstanzas”,100);
muc.sendConfigurationForm(newForm);
muc.join(user);
if(muc != null)
{
//muc.addMessageListener(messageListener);
}
}
``
Any ideas?
TIA!