Software /
code /
prosody
Changeset
6127:a66ebc5d0ab5
plugins/muc/muc.lib: Allow users with affiliations to invite while not in room themselves
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Wed, 19 Mar 2014 17:50:00 -0400 |
parents | 6126:122e0f26e8f6 |
children | 6128:8a71a1c34202 |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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