Diff

plugins/mod_pubsub.lua @ 5483:ed10252ee9c3

Merge 0.9->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 17 Apr 2013 19:11:57 +0200
parent 5481:169772e3d4e0
child 5569:c45997aebaa2
line wrap: on
line diff
--- a/plugins/mod_pubsub.lua	Wed Apr 17 14:20:02 2013 +0100
+++ b/plugins/mod_pubsub.lua	Wed Apr 17 19:11:57 2013 +0200
@@ -193,7 +193,9 @@
 	local id = (item and item.attr.id);
 	if not id then
 		id = uuid_generate();
-		item.attr.id = id;
+		if item then
+			item.attr.id = id;
+		end
 	end
 	local ok, ret = service:publish(node, stanza.attr.from, id, item);
 	local reply;