aboutsummaryrefslogtreecommitdiffstats
path: root/core
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
commitd16959ce161a09eaf3bd16e621fa63cfc0a70a50 (patch)
tree66b6b3054f9cbbf5e8900022221d24695bdb5512 /core
parent32a12191888eb70359daf93289e0ec335aada6fd (diff)
downloadprosody-d16959ce161a09eaf3bd16e621fa63cfc0a70a50.tar.gz
prosody-d16959ce161a09eaf3bd16e621fa63cfc0a70a50.zip
hostmanager: Add support for 'disco_hidden' option to hide hosts from disco#items (thanks Ge0rG)
Diffstat (limited to 'core')
-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