# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1401454654 -7200
# Node ID 4852fc446d2669d894d8e04e2c741dab20bffdc2
# Parent  c3882787ae06e0066eb299729c7a9d5d8a3e3a22
mod_profile: Use the item id "current" as recomended in the Singleton Nodes section of XEP-0060

diff -r c3882787ae06 -r 4852fc446d26 mod_profile/mod_profile.lua
--- a/mod_profile/mod_profile.lua	Fri May 30 14:55:54 2014 +0200
+++ b/mod_profile/mod_profile.lua	Fri May 30 14:57:34 2014 +0200
@@ -45,13 +45,13 @@
 	local pep = pep_plus.get_pep_service(username.."@"..module.host);
 	if vcard.to_vcard4 then
 		pep:purge("urn:xmpp:vcard4", true);
-		pep:publish("urn:xmpp:vcard4", true, "", st.stanza("item"):add_child(vcard.to_vcard4(data)));
+		pep:publish("urn:xmpp:vcard4", true, "current", st.stanza("item"):add_child(vcard.to_vcard4(data)));
 	end
 
 	local nickname = get_item(data, "NICKNAME");
 	if nickname and nickname[1] then
 		pep:purge("http://jabber.org/protocol/nick", true);
-		pep:publish("http://jabber.org/protocol/nick", true, "", st.stanza("item")
+		pep:publish("http://jabber.org/protocol/nick", true, "current", st.stanza("item")
 			:tag("nick", { xmlns="http://jabber.org/protocol/nick" }):text(nickname[1]));
 	end
 
@@ -62,7 +62,7 @@
 
 		pep:purge("urn:xmpp:avatar:metadata", true);
 		pep:purge("urn:xmpp:avatar:data", true);
-		pep:publish("urn:xmpp:avatar:metadata", true, "", st.stanza("item")
+		pep:publish("urn:xmpp:avatar:metadata", true, "current", st.stanza("item")
 			:tag("metadata", {
 				xmlns="urn:xmpp:avatar:metadata",
 				bytes = tostring(#photo_raw),