diff options
author | Matthew Wild <mwild1@gmail.com> | 2017-09-20 14:42:21 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2017-09-20 14:42:21 +0100 |
commit | d16959ce161a09eaf3bd16e621fa63cfc0a70a50 (patch) | |
tree | 66b6b3054f9cbbf5e8900022221d24695bdb5512 | |
parent | 32a12191888eb70359daf93289e0ec335aada6fd (diff) | |
download | prosody-d16959ce161a09eaf3bd16e621fa63cfc0a70a50.tar.gz prosody-d16959ce161a09eaf3bd16e621fa63cfc0a70a50.zip |
hostmanager: Add support for 'disco_hidden' option to hide hosts from disco#items (thanks Ge0rG)
-rw-r--r-- | core/hostmanager.lua | 2 |
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 |