plugins/muc/muc.lib: Allow users with affiliations to invite while not in room themselves
--- 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