mod_privacy_lists: Correctly sort the list rules by order (thanks Flow). Fixes issue #58

Sat, 16 Aug 2014 17:55:08 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 16 Aug 2014 17:55:08 +0100
changeset 1487
5410f5c30d63
parent 1486
b3e692ee16b5
child 1488
ba97f9be4f76

mod_privacy_lists: Correctly sort the list rules by order (thanks Flow). Fixes issue #58

mod_privacy_lists/mod_privacy_lists.lua file | annotate | diff | comparison | revisions
--- 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

mercurial