Changeset

6827:19c4532946b3

MUC: Fix traceback in request for MUC affiliation lists by non-affiliated (thanks Lance)
author Kim Alvefur <zash@zash.se>
date Tue, 15 Sep 2015 19:39:57 +0200
parents 6826:17a4e89a4780
children 6828:9019bc4c9a5a
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Fri Sep 04 11:11:40 2015 +0100
+++ b/plugins/muc/muc.lib.lua	Tue Sep 15 19:39:57 2015 +0200
@@ -762,7 +762,7 @@
 	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