Software /
code /
prosody
Comparison
util/prosodyctl/check.lua @ 12414:a93e65784f2c 0.12
prosodyctl: check config: Skip bare JID components in orphan check
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 19 Mar 2022 09:28:27 +0000 |
parent | 12390:71b5c9b8b07a |
child | 12416:19fd28239e73 |
comparison
equal
deleted
inserted
replaced
12393:6966026262f4 | 12414:a93e65784f2c |
---|---|
665 for _, disco_item in ipairs(host_options.disco_items or {}) do | 665 for _, disco_item in ipairs(host_options.disco_items or {}) do |
666 referenced_components:add(disco_item[1]); | 666 referenced_components:add(disco_item[1]); |
667 end | 667 end |
668 end | 668 end |
669 end | 669 end |
670 for host, host_config in enabled_hosts() do | 670 for host, host_config in it.filter(skip_bare_jid_hosts, enabled_hosts()) do |
671 local is_component = not not host_config.component_module; | 671 local is_component = not not host_config.component_module; |
672 if is_component then | 672 if is_component then |
673 local parent_domain = host:match("^[^.]+%.(.+)$"); | 673 local parent_domain = host:match("^[^.]+%.(.+)$"); |
674 local is_orphan = not (enabled_hosts_set:contains(parent_domain) or referenced_components:contains(host)); | 674 local is_orphan = not (enabled_hosts_set:contains(parent_domain) or referenced_components:contains(host)); |
675 if is_orphan then | 675 if is_orphan then |