Diff

mod_profile/mod_profile.lua @ 1469:019746bba318

mod_profile: Add the missing <info> child element and move info attributes there
author Kim Alvefur <zash@zash.se>
date Tue, 08 Jul 2014 02:54:04 +0200
parent 1446:843769eb40c3
child 1470:b291a9423e0f
line wrap: on
line diff
--- a/mod_profile/mod_profile.lua	Fri Jul 04 14:47:14 2014 +0200
+++ b/mod_profile/mod_profile.lua	Tue Jul 08 02:54:04 2014 +0200
@@ -68,12 +68,12 @@
 		pep:purge("urn:xmpp:avatar:metadata", true);
 		pep:purge("urn:xmpp:avatar:data", true);
 		pep:publish("urn:xmpp:avatar:metadata", true, "current", st.stanza("item", {id="current"})
-			:tag("metadata", {
-				xmlns="urn:xmpp:avatar:metadata",
-				bytes = tostring(#photo_raw),
-				id = photo_hash,
-				type = identify(photo_raw),
-			}));
+			:tag("metadata", { xmlns="urn:xmpp:avatar:metadata" })
+				:tag("info", {
+					bytes = tostring(#photo_raw),
+					id = photo_hash,
+					type = identify(photo_raw),
+				}));
 		pep:publish("urn:xmpp:avatar:data", true, photo_hash, st.stanza("item", {id="current"})
 			:tag("data", { xmlns="urn:xmpp:avatar:data" }):text(photo[1]));
 	end