1
我正在创建一个新的多用户聊天室,并将用户添加到这个房间,但是当用户离线时,他们离开房间 如何让用户保持在永久的房间我在openfire搜索房间配置,没有这样的选项,请帮助,如果不可能什么是一个永久性群聊的最佳方式(如whatapp群)?这里是我正在使用的代码Asmack/openfire如何让用户永久进入分组聊天室
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);
那么什么是最好的路线,然后做groupChat用户属于组将保持在像WhatsApp组聊天?????????请有人帮忙 –
首先想到:与XMPP PubSub – Flow
实现群聊,所以openfire和asmack无法实现我的req?我尝试过“SharedGroups”,但openfire客户端无法管理“sharedGroups”。任何想法 ?? –