Changeset

3160:330e8c81f6af

mod_pubsub_stats: Include namespace on pubsub items (fixes use with trunk)
author Kim Alvefur <zash@zash.se>
date Mon, 02 Jul 2018 10:14:13 +0200
parents 3159:e995cd0f228e
children 3161:887a8100343a
files mod_pubsub_stats/mod_pubsub_stats.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_stats/mod_pubsub_stats.lua	Thu Jun 28 21:45:25 2018 +0200
+++ b/mod_pubsub_stats/mod_pubsub_stats.lua	Mon Jul 02 10:14:13 2018 +0200
@@ -4,11 +4,13 @@
 
 local actor = module.host .. "/modules/" .. module.name;
 
+local pubsub_xmlns = "http://jabber.org/protocol/pubsub"
+
 local node = module:get_option_string(module.name .. "_node", "stats");
 
 local function publish_stats(stats, stats_extra)
 	local id = "current";
-	local xitem = st.stanza("item", { id = id })
+	local xitem = st.stanza("item", { xmlns = pubsub_xmlns, id = id })
 		:tag("query", { xmlns = "http://jabber.org/protocol/stats" });
 
 	for name, value in pairs(stats) do