Commit 7fdde200 authored by David Smith's avatar David Smith Committed by david

Add a 'jid' field to the MUC search results

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9819 b35dd754-fafc-0310-a699-88a17e54d16e
parent c9792a95
...@@ -340,8 +340,11 @@ public class IQMUCSearchHandler ...@@ -340,8 +340,11 @@ public class IQMUCSearchHandler
innerfield.setType(FormField.TYPE_BOOLEAN); innerfield.setType(FormField.TYPE_BOOLEAN);
innerfield.addValue(Boolean.toString(room.isMembersOnly())); innerfield.addValue(Boolean.toString(room.isMembersOnly()));
fields.add(innerfield); fields.add(innerfield);
innerfield = new XFormFieldImpl("jid");
resultform.addItemFields(fields); innerfield.setType(FormField.TYPE_TEXT_SINGLE);
innerfield.addValue(room.getRole().getRoleAddress().toString());
fields.add(innerfield);
resultform.addItemFields(fields);
atLeastoneResult = true; atLeastoneResult = true;
} }
if (atLeastoneResult) if (atLeastoneResult)
...@@ -366,8 +369,12 @@ public class IQMUCSearchHandler ...@@ -366,8 +369,12 @@ public class IQMUCSearchHandler
"is_password_protected"); "is_password_protected");
rffPasswordProtected.setLabel("Is a password protected room."); rffPasswordProtected.setLabel("Is a password protected room.");
resultform.addReportedField(rffPasswordProtected); resultform.addReportedField(rffPasswordProtected);
FormField innerfield = new XFormFieldImpl("is_member_only"); final FormField rffJID = new XFormFieldImpl("jid");
rffJID.setLabel("JID");
resultform.addReportedField(rffJID);
FormField innerfield = new XFormFieldImpl("is_member_only");
innerfield.setType(FormField.TYPE_TEXT_SINGLE); innerfield.setType(FormField.TYPE_TEXT_SINGLE);
innerfield.setLabel("Is a member only room."); innerfield.setLabel("Is a member only room.");
resultform.addReportedField(innerfield); resultform.addReportedField(innerfield);
......
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