From 1822bfc7e51962f76417d74182e7de5ddac10b19 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 28 Aug 2014 09:17:07 +0100 Subject: mod_privacy: Fix to correctly sort privacy list rules by order (thanks Flow) --- plugins/mod_privacy.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_privacy.lua b/plugins/mod_privacy.lua index 31ace9f9..49c9427f 100644 --- a/plugins/mod_privacy.lua +++ b/plugins/mod_privacy.lua @@ -157,7 +157,7 @@ function createOrReplaceList (privacy_lists, origin, stanza, name, entries) 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 -- cgit v1.2.3