Changeset

6365:75bd55e84112

mod_privacy: Fix to correctly sort privacy list rules by order (thanks Flow)
author Matthew Wild <mwild1@gmail.com>
date Thu, 28 Aug 2014 09:17:07 +0100
parents 6364:4e93e8768c36
children 6366:8dee696c33cc
files plugins/mod_privacy.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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