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 | fd4a486166f340c736f15636ff5dc3940a806995 (patch) | |
tree | 6f1d2172515d10f815b20a2fb998a82cc36d43d2 /plugins | |
parent | c6d4ea2e3b5db640310d5cb7b5d1b8b27fc7c831 (diff) | |
download | prosody-fd4a486166f340c736f15636ff5dc3940a806995.tar.gz prosody-fd4a486166f340c736f15636ff5dc3940a806995.zip |
plugins/muc/muc.lib: Check role instead of current_nick
Diffstat (limited to 'plugins')
-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 |