Changeset

5683:624b874059bf

Merge 0.9->trunk
author Matthew Wild <mwild1@gmail.com>
date Thu, 13 Jun 2013 13:56:58 +0100
parents 5681:43cc1f95395e (current diff) 5682:e7b9ba2d0638 (diff)
children 5684:5554029d759b 5694:7aec065d78a0
files plugins/mod_pep.lua
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pep.lua	Thu Jun 13 12:07:46 2013 +0100
+++ b/plugins/mod_pep.lua	Thu Jun 13 13:56:58 2013 +0100
@@ -62,7 +62,7 @@
 		end
 	else
 		if not user_data then user_data = {}; data[bare] = user_data; end
-		user_data[node] = {id or "1", item};
+		user_data[node] = {id, item};
 	end
 
 	-- broadcast
@@ -169,7 +169,8 @@
 			local node = payload.attr.node;
 			payload = payload.tags[1];
 			if payload and payload.name == "item" then -- <item>
-				local id = payload.attr.id;
+				local id = payload.attr.id or "1";
+				payload.attr.id = id;
 				session.send(st.reply(stanza));
 				publish(session, node, id, st.clone(payload));
 				return true;