# HG changeset patch # User Kim Alvefur # Date 1587672464 -7200 # Node ID 0233da912ab611accacd08c7135deaf0ef964c08 # Parent eb56e743abe8c105057b17a91ed3c881a3004fec mod_csi_muc_priorities: Fix bad argument to 'ipairs' on a missing list If either of the two list-multi are empty then apparently nothing thougth to include an empty array. Meh. diff -r eb56e743abe8 -r 0233da912ab6 mod_csi_muc_priorities/mod_csi_muc_priorities.lua --- a/mod_csi_muc_priorities/mod_csi_muc_priorities.lua Thu Apr 23 20:12:42 2020 +0200 +++ b/mod_csi_muc_priorities/mod_csi_muc_priorities.lua Thu Apr 23 22:07:44 2020 +0200 @@ -105,11 +105,15 @@ end local prioritized_jids = {}; if fields.unimportant then - for _, jid in ipairs(fields.unimportant) do - prioritized_jids[jid] = false; + if fields.unimportant then + for _, jid in ipairs(fields.unimportant) do + prioritized_jids[jid] = false; + end end - for _, jid in ipairs(fields.important) do - prioritized_jids[jid] = true; + if fields.important then + for _, jid in ipairs(fields.important) do + prioritized_jids[jid] = true; + end end end