# HG changeset patch # User daurnimator # Date 1395265800 14400 # Node ID a66ebc5d0ab52b5df4e1fd53bb05496ee54c5952 # Parent 122e0f26e8f6e016e149d20c1c7de4d0ee92e5ee plugins/muc/muc.lib: Allow users with affiliations to invite while not in room themselves diff -r 122e0f26e8f6 -r a66ebc5d0ab5 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Wed Mar 19 17:46:25 2014 -0400 +++ b/plugins/muc/muc.lib.lua Wed Mar 19 17:50:00 2014 -0400 @@ -986,7 +986,7 @@ 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