aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-10-05 12:16:28 -0400
committerMatthew Wild <mwild1@gmail.com>2013-10-05 12:16:28 -0400
commit4fda0169d29af6047dd71840f879ee38e9c23878 (patch)
tree9344408f15cd0951aad0c621076ac09fb81d539a /plugins/mod_pubsub
parentdf8b4c6f4d2e853a146ca8f978b69f614de30105 (diff)
parent45490a4215a96c8745da04255738c67438705203 (diff)
downloadprosody-4fda0169d29af6047dd71840f879ee38e9c23878.tar.gz
prosody-4fda0169d29af6047dd71840f879ee38e9c23878.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_pubsub')
-rw-r--r--plugins/mod_pubsub/mod_pubsub.lua2
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua
index 81a66f8b..2868d409 100644
--- a/plugins/mod_pubsub/mod_pubsub.lua
+++ b/plugins/mod_pubsub/mod_pubsub.lua
@@ -103,7 +103,7 @@ module:hook("host-disco-items-node", function (event)
return origin.send(pubsub_error_reply(stanza, ret));
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