diff plugins/mod_pubsub/pubsub.lib.lua @ 6434:382e03a40dd2

mod_pubsub: Transplant pieces of cdcfd93e2f43 from trunk
author Kim Alvefur <zash@zash.se>
date Sat, 27 Sep 2014 19:53:39 +0200
parents 8416d4619d80
children b1c40054b59d
line wrap: on
line diff
--- 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