Software /
code /
prosody
Diff
plugins/mod_pubsub/pubsub.lib.lua @ 5851:cdcfd93e2f43
mod_pubsub, util.pubsub: Keep track of the order of items
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 04 Oct 2013 16:40:27 +0200 |
parent | 5626:8416d4619d80 |
child | 6438:b1c40054b59d |
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua Mon Sep 30 23:46:38 2013 +0100 +++ b/plugins/mod_pubsub/pubsub.lib.lua Fri Oct 04 16:40:27 2013 +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