Mercurial > prosody-modules
diff mod_isolate_host/mod_isolate_host.lua @ 5096:16db0a6e868c
mod_isolate_host: Pass context to module:may() (thanks cc)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 29 Nov 2022 11:36:28 +0000 |
parents | bc75fc9400ae |
children | 0f5657db1cfc |
line wrap: on
line diff
--- a/mod_isolate_host/mod_isolate_host.lua Mon Nov 28 19:12:37 2022 +0100 +++ b/mod_isolate_host/mod_isolate_host.lua Tue Nov 29 11:36:28 2022 +0000 @@ -39,7 +39,7 @@ function check_user_isolated(event) local session = event.session; local bare_jid = jid_bare(session.full_jid); - if module:may("xmpp:federate") or except_users:contains(bare_jid) then + if module:may("xmpp:federate", event) or except_users:contains(bare_jid) then session.no_host_isolation = true; end module:log("debug", "%s is %sisolated", session.full_jid or "[?]", session.no_host_isolation and "" or "not ");