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 | 061cc1c21602540ef72cdd765c171d2898ae3b83 (patch) | |
tree | 33e7aebe4dcd8c726f97097016d0fc09e229454c /plugins/muc | |
parent | 1dcf3e89383ef54bfedc412a7184b01e04c3a57b (diff) | |
download | prosody-061cc1c21602540ef72cdd765c171d2898ae3b83.tar.gz prosody-061cc1c21602540ef72cdd765c171d2898ae3b83.zip |
plugins/muc/muc.lib: Allow users with affiliations to invite while not in room themselves
Diffstat (limited to 'plugins/muc')
-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 |