comparison mod_unified_push/mod_unified_push.lua @ 5151:514c8a0e9aa1

mod_unified_push: Fix default ACL in component mode
author Matthew Wild <mwild1@gmail.com>
date Sat, 14 Jan 2023 16:14:50 +0000
parents 2b6c543c4d3a
children 342baedbd1c8
comparison
equal deleted inserted replaced
5150:2b6c543c4d3a 5151:514c8a0e9aa1
15 module:depends("disco"); 15 module:depends("disco");
16 16
17 module:add_feature(xmlns_up); 17 module:add_feature(xmlns_up);
18 18
19 local acl = module:get_option_set("unified_push_acl", { 19 local acl = module:get_option_set("unified_push_acl", {
20 module:get_host_type() == "local" and module.host or module.host:match("^[^%.]%.(.+)$") 20 module:get_host_type() == "local" and module.host or module.host:match("^[^%.]+%.(.+)$")
21 }); 21 });
22 22
23 local function is_jid_permitted(user_jid) 23 local function is_jid_permitted(user_jid)
24 for acl_entry in acl do 24 for acl_entry in acl do
25 if jid.compare(user_jid, acl_entry) then 25 if jid.compare(user_jid, acl_entry) then