# HG changeset patch # User daurnimator # Date 1395264621 14400 # Node ID 203f2b4933b00e65302ea8a2590f036be261ce5a # Parent 7f82bbd249feb75baa268c1cd93ad03e834a65ae plugins/muc/muc.lib: Check role instead of current_nick diff -r 7f82bbd249fe -r 203f2b4933b0 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Wed Mar 19 16:28:11 2014 -0400 +++ b/plugins/muc/muc.lib.lua Wed Mar 19 17:30:21 2014 -0400 @@ -987,7 +987,8 @@ 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