diff --git a/resources/prosody-plugins/mod_jiconop.lua b/resources/prosody-plugins/mod_jiconop.lua index 0e0bcadf96..1a93e7301d 100644 --- a/resources/prosody-plugins/mod_jiconop.lua +++ b/resources/prosody-plugins/mod_jiconop.lua @@ -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();