diff options
author | Kim Alvefur <zash@zash.se> | 2014-09-27 19:53:39 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-09-27 19:53:39 +0200 |
commit | 158ea2ce458caa15881087bcab6809ef91cb54c9 (patch) | |
tree | 09d96eb3fc81a230e14bf45aa1c1067ef126471e | |
parent | 2967393ae804d87f2cd97c97bf8cf58b501f4e67 (diff) | |
download | prosody-158ea2ce458caa15881087bcab6809ef91cb54c9.tar.gz prosody-158ea2ce458caa15881087bcab6809ef91cb54c9.zip |
mod_pubsub: Transplant pieces of cdcfd93e2f43 from trunk
-rw-r--r-- | plugins/mod_pubsub/mod_pubsub.lua | 2 | ||||
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua index c6dbe831..33e729af 100644 --- a/plugins/mod_pubsub/mod_pubsub.lua +++ b/plugins/mod_pubsub/mod_pubsub.lua @@ -100,7 +100,7 @@ module:hook("host-disco-items-node", function (event) 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 --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index 2b015e34..4e9acd68 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -42,8 +42,8 @@ function handlers.get_items(origin, stanza, items, service) 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 |