Commit 0e2f461d authored by Christian Schudt's avatar Christian Schudt

OF-743 MUC room does not return its identity or features, when querying for room info

parent e311fd68
...@@ -1223,7 +1223,7 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService ...@@ -1223,7 +1223,7 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService
else if (name != null && node == null) { else if (name != null && node == null) {
// Answer the identity of a given room // Answer the identity of a given room
MUCRoom room = getChatRoom(name); MUCRoom room = getChatRoom(name);
if (room != null && canDiscoverRoom(room)) { if (room != null) {
Element identity = DocumentHelper.createElement("identity"); Element identity = DocumentHelper.createElement("identity");
identity.addAttribute("category", "conference"); identity.addAttribute("category", "conference");
identity.addAttribute("name", room.getNaturalLanguageName()); identity.addAttribute("name", room.getNaturalLanguageName());
...@@ -1266,10 +1266,13 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService ...@@ -1266,10 +1266,13 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService
else if (name != null && node == null) { else if (name != null && node == null) {
// Answer the features of a given room // Answer the features of a given room
MUCRoom room = getChatRoom(name); MUCRoom room = getChatRoom(name);
if (room != null && canDiscoverRoom(room)) { if (room != null) {
features.add("http://jabber.org/protocol/muc"); features.add("http://jabber.org/protocol/muc");
// Always add public since only public rooms can be discovered if (room.isPublicRoom()) {
features.add("muc_public"); features.add("muc_public");
} else {
features.add("muc_hidden");
}
if (room.isMembersOnly()) { if (room.isMembersOnly()) {
features.add("muc_membersonly"); features.add("muc_membersonly");
} }
...@@ -1309,7 +1312,7 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService ...@@ -1309,7 +1312,7 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService
if (name != null && node == null) { if (name != null && node == null) {
// Answer the extended info of a given room // Answer the extended info of a given room
MUCRoom room = getChatRoom(name); MUCRoom room = getChatRoom(name);
if (room != null && canDiscoverRoom(room)) { if (room != null) {
final DataForm dataForm = new DataForm(Type.result); final DataForm dataForm = new DataForm(Type.result);
final FormField fieldType = dataForm.addField(); final FormField fieldType = dataForm.addField();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment