Form form = muc.getConfigurationForm();
Form submitForm = form.createAnswerForm();
List<FormField> fields = form.getFields();
for (FormField field : fields) {
if (!FormField.Type.hidden.equals(field.getType()) && field.getVariable() != null) {
submitForm.setDefaultAnswer(field.getVariable());
Log.e(TAG, field.getVariable() + " "
+ field.getType().toString() + " "
+ field.getLabel());
}
}
muc 房间配置
字段 | 类型 | 标签 |
---|
muc#roomconfig_roomname | text-single | 房间名称 |
muc#roomconfig_roomdesc | text-single | 房间描述 |
muc#roomconfig_changesubject | boolean | 允许成员更改主题 |
muc#roomconfig_maxusers | list-single | 最大房间成员人数 |
muc#roomconfig_presencebroadcast | list-multi | 广播其存在的角色 |
muc#roomconfig_publicroom | boolean | 在目录中列出房间 |
muc#roomconfig_persistentroom | boolean | 永久房间 |
muc#roomconfig_moderatedroom | boolean | 房间需要审核 |
muc#roomconfig_membersonly | boolean | 房间仅对成员开放 |
muc#roomconfig_allowinvites | boolean | 允许成员邀请其他人 |
muc#roomconfig_passwordprotectedroom | boolean | 需要密码才能进入房间 |
muc#roomconfig_roomsecret | text-private | 密码 |
muc#roomconfig_whois | list-single | 能够发现成员真实 JID 的角色 |
muc#roomconfig_allowpm | list-single | Allowed to Send Private Messages |
muc#roomconfig_enablelogging | boolean | 记录房间聊天 |
x-muc#roomconfig_reservednick | boolean | 仅允许注册昵称登录 |
x-muc#roomconfig_canchangenick | boolean | 允许成员修改昵称 |
x-muc#roomconfig_registration | boolean | 允许用户注册房间 |
muc#roomconfig_roomadmins | jid-multi | 房间管理员 |
muc#roomconfig_roomowners | jid-multi | 房间拥有者 |