mod_privacy: Fix to correctly sort privacy list rules by order (thanks Flow)

This commit is contained in:
Matthew Wild 2014-08-28 09:17:07 +01:00
parent 933bb5a869
commit 27c737e5ff

View file

@ -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