# HG changeset patch # User Florian Zeitz # Date 1359155724 -3600 # Node ID e3ad5f3aa6d454c1da492c486d9e34f68f1d3674 # Parent aca1c5eb050871665c04e32076cfe63e26c5dbb3 mod_admin_web: Adapt to util.pubsub changes diff -r aca1c5eb0508 -r e3ad5f3aa6d4 mod_admin_web/admin_web/mod_admin_web.lua --- a/mod_admin_web/admin_web/mod_admin_web.lua Fri Jan 18 10:00:59 2013 +0100 +++ b/mod_admin_web/admin_web/mod_admin_web.lua Sat Jan 26 00:15:24 2013 +0100 @@ -114,12 +114,14 @@ }); -- Setup adminsub service - local function simple_broadcast(node, jids, item) - item = st.clone(item); - item.attr.xmlns = nil; -- Clear the pubsub namespace + local function simple_broadcast(kind, node, jids, item) + if item then + item = st.clone(item); + item.attr.xmlns = nil; -- Clear the pubsub namespace + end local message = st.message({ from = module.host, type = "headline" }) :tag("event", { xmlns = xmlns_adminsub .. "#event" }) - :tag("items", { node = node }) + :tag(kind, { node = node }) :add_child(item); for jid in pairs(jids) do module:log("debug", "Sending notification to %s", jid);