Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 5334:da7857891eb8
MUC: Fix affiliation check for admins, and bring it in line with the spec (thanks Maranda).
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 26 Feb 2013 20:31:41 +0500 |
parent | 5294:87f07dd0bbfb |
child | 5335:bb81c13d2c6f |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Tue Feb 26 19:41:52 2013 +0500 +++ b/plugins/muc/muc.lib.lua Tue Feb 26 20:31:41 2013 +0500 @@ -987,7 +987,7 @@ return true; end if actor_affiliation ~= "owner" then - if actor_affiliation ~= "admin" or target_affiliation == "owner" or target_affiliation == "admin" then + if affiliation == "owner" or affiliation == "admin" or actor_affiliation ~= "admin" or target_affiliation == "owner" or target_affiliation == "admin" then return nil, "cancel", "not-allowed"; end elseif target_affiliation == "owner" and jid_bare(actor) == jid then -- self change