diff options
author | daurnimator <quae@daurnimator.com> | 2014-03-19 17:50:00 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-03-19 17:50:00 -0400 |
commit | 8f5af6d933d1f07db23b1c0f77ce0804c1643c84 (patch) | |
tree | 33e7aebe4dcd8c726f97097016d0fc09e229454c /plugins/muc/muc.lib.lua | |
parent | 35a820aba5a9017d350fe907bf4fe7b463e0f185 (diff) | |
download | prosody-8f5af6d933d1f07db23b1c0f77ce0804c1643c84.tar.gz prosody-8f5af6d933d1f07db23b1c0f77ce0804c1643c84.zip |
plugins/muc/muc.lib: Allow users with affiliations to invite while not in room themselves
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-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 fe8aee72..af7bf356 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -986,7 +986,7 @@ function room_mt:handle_mediated_invite(origin, stanza) local _from, _to = stanza.attr.from, stanza.attr.to; local current_nick = self:get_occupant_jid(_from) -- Need visitor role or higher to invite - if not self._occupants[current_nick].role then + if not self:get_role(current_nick) or not self:get_default_role(self:get_affiliation(_from)) then origin.send(st.error_reply(stanza, "auth", "forbidden")); return true; end |