aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-09-15 19:39:57 +0200
committerKim Alvefur <zash@zash.se>2015-09-15 19:39:57 +0200
commitff7c810d5ac516f757f08d917bbc888c3783b6b8 (patch)
tree919c8395c481ca705dd56facda257d1c1917907c /plugins/muc/muc.lib.lua
parent4591053d46bc7fa2dc589236856917ed37f9bb88 (diff)
downloadprosody-ff7c810d5ac516f757f08d917bbc888c3783b6b8.tar.gz
prosody-ff7c810d5ac516f757f08d917bbc888c3783b6b8.zip
MUC: Fix traceback in request for MUC affiliation lists by non-affiliated (thanks Lance)
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua2
1 files changed, 1 insertions, 1 deletions
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