mod_privacy: Fix to correctly sort privacy list rules by order (thanks Flow)
authorMatthew Wild <mwild1@gmail.com>
Thu, 28 Aug 2014 09:17:07 +0100
changeset 6365 75bd55e84112
parent 6364 4e93e8768c36
child 6366 8dee696c33cc
mod_privacy: Fix to correctly sort privacy list rules by order (thanks Flow)
plugins/mod_privacy.lua
--- a/plugins/mod_privacy.lua	Sat Aug 23 09:29:17 2014 +0100
+++ b/plugins/mod_privacy.lua	Thu Aug 28 09:17:07 2014 +0100
@@ -157,7 +157,7 @@
 		list.items[#list.items + 1] = tmp;
 	end
 	
-	table.sort(list, function(a, b) return a.order < b.order; end);
+	table.sort(list.items, function(a, b) return a.order < b.order; end);
 
 	origin.send(st.reply(stanza));
 	if bare_sessions[bare_jid] ~= nil then