mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
fix(jiconop): Fixes loading it under different virtual hosts.
This commit is contained in:
@@ -7,6 +7,12 @@ local services_xml = ext_services.services_xml;
|
||||
-- gathers needed information and pushes it with a message to clients
|
||||
-- this way we skip 4 request responses during every client setup
|
||||
|
||||
local main_virtual_host = module:get_option_string('muc_mapper_domain_base');
|
||||
if not main_virtual_host then
|
||||
module:log('warn', 'No muc_mapper_domain_base option set.');
|
||||
return;
|
||||
end
|
||||
|
||||
local shard_name_config = module:get_option_string('shard_name');
|
||||
if shard_name_config then
|
||||
module:add_identity("server", "shard", shard_name_config);
|
||||
@@ -33,7 +39,8 @@ module:hook("resource-bind", function (event)
|
||||
-- disco info data / all identity and features
|
||||
local query = st.stanza("query", { xmlns = "http://jabber.org/protocol/disco#info" });
|
||||
local done = {};
|
||||
for _,identity in ipairs(module:get_host_items("identity")) do
|
||||
-- to lod this module in different virtual hosts than the main, make sure we query here for main
|
||||
for _,identity in ipairs(module:context(main_virtual_host):get_host_items("identity")) do
|
||||
local identity_s = identity.category.."\0"..identity.type;
|
||||
if not done[identity_s] then
|
||||
query:tag("identity", identity):up();
|
||||
|
||||
Reference in New Issue
Block a user