powered by Jive Software

Can not create persistent rooms


i create IM room but the room, i set IM room is persistent:

        // 获得聊天室的配置表单 根据原始表单创建一个要提交的新表单。
        Form form = muc.getConfigurationForm();
        Form answerForm = form.createAnswerForm();

        for(FormField formField:form.getFields()){
//            System.out.println(
//                    "TYPE(类型):"+formField.getType()+ ",Variable(参数):"+formField.getVariable());
            if(formField.getVariable() != null && !formField.getVariable().equals("FORM_TYPE")){

        answerForm.setAnswer("muc#roomconfig_persistentroom", true);
        answerForm.setAnswer("muc#roomconfig_roomowners", owners);

        // 发送已完成的表单(有默认值)到服务器来配置聊天室

the room is create success ,but the room persistent is fail ,
so i look code send message
the xml muc#roomconfig_persistentroom value is 0

i dont now why ? i setAnswer is true why have value is 0

Smack 4.2.4 public static XMPPError.Builder parseError(XmlPullParser parser) in PacketParserUtils class has problem

I´m facing the same problem…

what is your environment?

I tried with Openfire 4.2.6 and Openfire 4.1.6 and using Smack 4.2.4 and 4.3.

The room was created but when I call disconnect, the room is destroyed.

How can you read the message sent (in your image) when you call muc.sendConfiguration ?



Hi @DavidGHS i found a workaround.

I tried:

instead of

answerForm.setAnswer(“muc#roomconfig_persistentroom”, true);

and it works fine. It’s a thing to Smack developers work.