changeset 1487:5410f5c30d63

mod_privacy_lists: Correctly sort the list rules by order (thanks Flow). Fixes issue #58
author Matthew Wild <mwild1@gmail.com>
date Sat, 16 Aug 2014 17:55:08 +0100
parents b3e692ee16b5
children ba97f9be4f76
files mod_privacy_lists/mod_privacy_lists.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_privacy_lists/mod_privacy_lists.lua	Fri Aug 15 21:17:58 2014 +0100
+++ b/mod_privacy_lists/mod_privacy_lists.lua	Sat Aug 16 17:55:08 2014 +0100
@@ -175,7 +175,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