mod_pubsub: Ensure <item> is in correct scope when broadcasting an event
authorMatthew Wild <mwild1@gmail.com>
Sun, 5 Dec 2010 19:54:48 +0000 (19:54 +0000)
committerMatthew Wild <mwild1@gmail.com>
Sun, 5 Dec 2010 19:54:48 +0000 (19:54 +0000)
plugins/mod_pubsub.lua

index 0644001f958df3eec378e52d87906c5431e8a2da..0953de28d11d56c8b926c9c16d33add90d0f7d68 100644 (file)
@@ -151,6 +151,8 @@ function handlers.set_retract(origin, stanza, retract)
 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 })