aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2017-09-20 14:42:21 +0100
committerMatthew Wild <mwild1@gmail.com>2017-09-20 14:42:21 +0100
commit59d5cc9beb139b744d4fe114f853fbcc877ee3ea (patch)
tree66b6b3054f9cbbf5e8900022221d24695bdb5512
parent6a665c5a76c145df4c5545018d1928a6ea84cbc5 (diff)
downloadprosody-59d5cc9beb139b744d4fe114f853fbcc877ee3ea.tar.gz
prosody-59d5cc9beb139b744d4fe114f853fbcc877ee3ea.zip
hostmanager: Add support for 'disco_hidden' option to hide hosts from disco#items (thanks Ge0rG)
-rw-r--r--core/hostmanager.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/hostmanager.lua b/core/hostmanager.lua
index 53c1cd4e..643724c2 100644
--- a/core/hostmanager.lua
+++ b/core/hostmanager.lua
@@ -100,7 +100,7 @@ function activate(host, host_config)
host_session.type = "component";
end
hosts[host] = host_session;
- if not host:match("[@/]") then
+ if not host_config.disco_hidden and not host:match("[@/]") then
disco_items:set(host:match("%.(.*)") or "*", host, host_config.name or true);
end
for option_name in pairs(host_config) do