Commit d86aaa6e authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Include only one list in the answer when getting a specific list. JM-785

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4602 b35dd754-fafc-0310-a699-88a17e54d16e
parent 316d55a4
......@@ -187,6 +187,7 @@ public class IQPrivacyHandler extends IQHandler
}
if (list != null) {
// Add the privacy list to the result
childElement = result.setChildElement("query", "jabber:iq:privacy");
childElement.add(list.asElement());
}
else {
......@@ -360,13 +361,15 @@ public class IQPrivacyHandler extends IQHandler
try {
sessionManager.userBroadcast(from.getNode(), pushPacket);
}
catch (UnauthorizedException e) {}
catch (UnauthorizedException e) {
// Ignore
}
return result;
}
private IQ deleteList(IQ packet, JID from, String listName) {
ClientSession currentSession = null;
ClientSession currentSession;
IQ result = IQ.createResultIQ(packet);
Element childElement = packet.getChildElement().createCopy();
result.setChildElement(childElement);
......
......@@ -119,7 +119,9 @@ public class PrivacyList implements Cacheable {
* @return an Element with the privacy list XML representation.
*/
public Element asElement() {
Element listElement = DocumentFactory.getInstance().createDocument().addElement("list");
//Element listElement = DocumentFactory.getInstance().createDocument().addElement("list");
Element listElement = DocumentFactory.getInstance().createDocument()
.addElement("list", "jabber:iq:privacy");
listElement.addAttribute("name", getName());
// Add the list items to the result
for (PrivacyItem item : items) {
......
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