Changeset

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 5095:745c7f4cca40
children 5097:d414fa8b37dc
files mod_isolate_host/mod_isolate_host.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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 ");