diff options
author | daurnimator <quae@daurnimator.com> | 2014-03-19 17:30:21 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-03-19 17:30:21 -0400 |
commit | 2f6301bca2108abb064aaf2c2ff7f991e97ce67a (patch) | |
tree | 6f1d2172515d10f815b20a2fb998a82cc36d43d2 /plugins/muc/muc.lib.lua | |
parent | 0ae91158e6c464932b6e0f540bc43b0b41ca8191 (diff) | |
download | prosody-2f6301bca2108abb064aaf2c2ff7f991e97ce67a.tar.gz prosody-2f6301bca2108abb064aaf2c2ff7f991e97ce67a.zip |
plugins/muc/muc.lib: Check role instead of current_nick
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index be4d31c3..7b010646 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -987,7 +987,8 @@ function room_mt:handle_mediated_invite(origin, stanza) local payload = stanza:get_child("x", "http://jabber.org/protocol/muc#user"):get_child("invite") local _from, _to = stanza.attr.from, stanza.attr.to; local current_nick = self:get_occupant_jid(_from) - if not current_nick then -- Should be in room to send invite TODO: allow admins to send at any time + -- Need visitor role or higher to invite + if not self._occupants[current_nick].role then origin.send(st.error_reply(stanza, "auth", "forbidden")); return true; end |