Commit 4903df13 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Fixed incorrect wrapping of vCard element. JM-9


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@198 b35dd754-fafc-0310-a699-88a17e54d16e
parent 21af6c34
......@@ -22,6 +22,7 @@ import java.util.Iterator;
import java.util.List;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.QName;
/**
* Implements the TYPE_IQ vcard-temp protocol. Clients
......@@ -83,10 +84,10 @@ public class IQvCardHandler extends IQHandler {
User user = userManager.getUser(recipient.getName());
result = packet.createResult();
XMPPDOMFragment frag = new XMPPDOMFragment();
Element vcard = DocumentHelper.createElement(QName.get("VCARD", "vcard-temp"));
XMPPDOMFragment frag = new XMPPDOMFragment(vcard);
result.setChildFragment(frag);
Element vcard = frag.getRootElement().addElement("VCARD", "vcard-temp");
Iterator names = user.getVCardPropertyNames();
while (names.hasNext()) {
String name = (String)names.next();
......
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