aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index fe8aee72..af7bf356 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -986,7 +986,7 @@ function room_mt:handle_mediated_invite(origin, stanza)
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