diff options
author | Waqas Hussain <waqas20@gmail.com> | 2013-02-26 20:31:41 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2013-02-26 20:31:41 +0500 |
commit | 0db5373bfc837f667252b925aefc39d00a90c937 (patch) | |
tree | 74efe080ad4cb19edf598538758a49217b0cdbf2 /plugins | |
parent | b9e7f08143c34747247b7f122b3ff1137f7f567d (diff) | |
download | prosody-0db5373bfc837f667252b925aefc39d00a90c937.tar.gz prosody-0db5373bfc837f667252b925aefc39d00a90c937.zip |
MUC: Fix affiliation check for admins, and bring it in line with the spec (thanks Maranda).
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 16a0238d..a48c9935 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -987,7 +987,7 @@ function room_mt:set_affiliation(actor, jid, affiliation, callback, reason) 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 |