Я успешно создаю новую комнату multiUserChat и добавляю пользователей в эту комнату, но когда пользователи отключаются от сети, они покидают комнату, как я могу постоянно удерживать пользователя в комнате? Я искал конфигурацию комнаты в openfire, и такой опции нет, пожалуйста, помогите, и если невозможно, как лучше всего создать постоянный групповой чат (например, whatapp grroup)??? вот код, который я использую
MultiUserChat muc = new MultiUserChat(MyApplication.connection, room);
// Create the room
SmackConfiguration.setPacketReplyTimeout(2000);
muc.create("testGroup2s2");
// Get the the room's configuration form
Form form = muc.getConfigurationForm();
// Create a new form to submit based on the original form
Form submitForm = form.createAnswerForm();
// Add default answers to the form to submit
for (Iterator<FormField> 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
submitForm.setDefaultAnswer(field.getVariable());
}
}
// Sets the new owner of the room
List<String> owners = new ArrayList<String>();
owners.add(MyApplication.connection.getUser() );
submitForm.setAnswer("muc#roomconfig_roomowners", owners);
muc.sendConfigurationForm(submitForm);