Diff

mod_profile/mod_profile.lua @ 3194:395835d89d88

mod_profile: Remove purging of previous PEP data, should no longer be needed
author Kim Alvefur <zash@zash.se>
date Tue, 24 Jul 2018 17:18:13 +0200
parent 3193:92d80b6ce375
child 3207:149cc5ddc64f
line wrap: on
line diff
--- a/mod_profile/mod_profile.lua	Tue Jul 24 16:26:40 2018 +0200
+++ b/mod_profile/mod_profile.lua	Tue Jul 24 17:18:13 2018 +0200
@@ -60,14 +60,12 @@
 	local photo, p = get_item(data, "PHOTO");
 	if vcard.to_vcard4 then
 		if p then t_remove(data, p); end
-		pep:purge("urn:xmpp:vcard4", true)
 		pep:publish("urn:xmpp:vcard4", true, item_container("current", vcard.to_vcard4(data)));
 		if p then t_insert(data, p, photo); end
 	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, item_container("current",
 			st.stanza("nick", { xmlns="http://jabber.org/protocol/nick" }):text(nickname[1])));
 	end
@@ -76,8 +74,6 @@
 		local photo_raw = base64.decode(photo[1]);
 		local photo_hash = sha1(photo_raw, true);
 
-		pep:purge("urn:xmpp:avatar:metadata", true);
-		pep:purge("urn:xmpp:avatar:data", true);
 		pep:publish("urn:xmpp:avatar:metadata", true, item_container(photo_hash,
 			st.stanza("metadata", { xmlns="urn:xmpp:avatar:metadata" })
 				:tag("info", {