aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub/pubsub.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-10-04 16:40:27 +0200
committerKim Alvefur <zash@zash.se>2013-10-04 16:40:27 +0200
commit76b14ec39b95d3f7b09b4cd3766e87c9fdd7fcd6 (patch)
tree526d84ef711408b482ad52210129c4fa45ffa031 /plugins/mod_pubsub/pubsub.lib.lua
parent6f46b6cd1a2f6cc65a55cbca524c664b78f219f5 (diff)
downloadprosody-76b14ec39b95d3f7b09b4cd3766e87c9fdd7fcd6.tar.gz
prosody-76b14ec39b95d3f7b09b4cd3766e87c9fdd7fcd6.zip
mod_pubsub, util.pubsub: Keep track of the order of items
Diffstat (limited to 'plugins/mod_pubsub/pubsub.lib.lua')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua4
1 files changed, 2 insertions, 2 deletions
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