From d74f55b64c5bdf137260d80b234a8c30cadaf4e3 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 15 Sep 2015 19:39:57 +0200 Subject: MUC: Fix traceback in request for MUC affiliation lists by non-affiliated (thanks Lance) --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 60b12ac8..cfc9dcff 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -762,7 +762,7 @@ function room_mt:handle_admin_query_get_command(origin, stanza) if _aff and _aff_rank and not _rol then -- You need to be at least an admin, and be requesting info about your affifiliation or lower -- e.g. an admin can't ask for a list of owners - local affiliation_rank = valid_affiliations[affiliation]; + local affiliation_rank = valid_affiliations[affiliation or "none"]; if affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank then local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin"); for jid in self:each_affiliation(_aff or "none") do -- cgit v1.2.3