Merge pull request #74 from snikket-im/fix/no-roles-no-isolation
mod_snikket_restricted_users: Don't isolate users with no roles
This commit is contained in:
commit
b57057f809
|
@ -9,7 +9,8 @@ local function load_main_host(module)
|
||||||
if not session.no_host_isolation then
|
if not session.no_host_isolation then
|
||||||
local bare_jid = jid_bare(session.full_jid);
|
local bare_jid = jid_bare(session.full_jid);
|
||||||
local roles = um_get_roles(bare_jid, module.host);
|
local roles = um_get_roles(bare_jid, module.host);
|
||||||
if roles and not roles["prosody:restricted"] then
|
if roles == false then return; end
|
||||||
|
if not roles or not roles["prosody:restricted"] then
|
||||||
-- Bypass isolation for all unrestricted users
|
-- Bypass isolation for all unrestricted users
|
||||||
session.no_host_isolation = true;
|
session.no_host_isolation = true;
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue