Diff

plugins/mod_pubsub.lua @ 3700:c8fcd63e9526

mod_pubsub: Ensure <item> is in correct scope when broadcasting an event
author Matthew Wild <mwild1@gmail.com>
date Sun, 05 Dec 2010 19:54:48 +0000
parent 3699:150e58d69e60
child 3760:3bfb65496773
line wrap: on
line diff
--- a/plugins/mod_pubsub.lua	Sun Dec 05 04:19:23 2010 +0100
+++ b/plugins/mod_pubsub.lua	Sun Dec 05 19:54:48 2010 +0000
@@ -151,6 +151,8 @@
 end
 
 function simple_broadcast(node, jids, item)
+	item = st.clone(item);
+	item.attr.xmlns = nil; -- Clear the pubsub namespace
 	local message = st.message({ from = module.host, type = "headline" })
 		:tag("event", { xmlns = xmlns_pubsub_event })
 			:tag("items", { node = node })