# HG changeset patch # User Kim Alvefur # Date 1411840419 -7200 # Node ID 382e03a40dd2a6c4a054100a7b225bd677377ae0 # Parent b93402cec1c4cf5bdc8f8919fea2e9b096706841 mod_pubsub: Transplant pieces of cdcfd93e2f43 from trunk diff -r b93402cec1c4 -r 382e03a40dd2 plugins/mod_pubsub/mod_pubsub.lua --- a/plugins/mod_pubsub/mod_pubsub.lua Fri Sep 26 17:16:46 2014 +0100 +++ b/plugins/mod_pubsub/mod_pubsub.lua Sat Sep 27 19:53:39 2014 +0200 @@ -100,7 +100,7 @@ return; end - for id, item in pairs(ret) do + for _, id in ipairs(ret) do reply:tag("item", { jid = module.host, name = id }):up(); end event.exists = true; diff -r b93402cec1c4 -r 382e03a40dd2 plugins/mod_pubsub/pubsub.lib.lua --- a/plugins/mod_pubsub/pubsub.lib.lua Fri Sep 26 17:16:46 2014 +0100 +++ b/plugins/mod_pubsub/pubsub.lib.lua Sat Sep 27 19:53:39 2014 +0200 @@ -42,8 +42,8 @@ end local data = st.stanza("items", { node = node }); - for _, entry in pairs(results) do - data:add_child(entry); + for _, id in ipairs(results) do + data:add_child(results[id]); end local reply; if data then