mod_private: Fix traceback due to missing table index
authorKim Alvefur <zash@zash.se>
Wed, 13 Aug 2014 19:19:34 +0200
changeset 6353 a868d5d6a83f
parent 6352 b703e6930e4c
child 6354 bbb4a82db32e
child 6355 c2d144d3f8dd
mod_private: Fix traceback due to missing table index
plugins/mod_private.lua
--- a/plugins/mod_private.lua	Tue Aug 12 15:42:20 2014 +0200
+++ b/plugins/mod_private.lua	Wed Aug 13 19:19:34 2014 +0200
@@ -27,7 +27,7 @@
 	end
 	if stanza.attr.type == "get" then
 		if data and data[key] then
-			return origin.send(st.reply(stanza):query("jabber:iq:private"):add_child(st.deserialize(data)));
+			return origin.send(st.reply(stanza):query("jabber:iq:private"):add_child(st.deserialize(data[key])));
 		else
 			return origin.send(st.reply(stanza):add_child(query));
 		end