aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-08-05 17:18:35 +0100
committerMatthew Wild <mwild1@gmail.com>2012-08-05 17:18:35 +0100
commit18fc86713ef365cb5d699bed2840dc7b8aef6995 (patch)
tree2bc3c28f6b3a561701f8e44d2b42add48edbb793 /plugins
parent537e1447c2d65576c2d8c37b1197c6ed897534a0 (diff)
downloadprosody-18fc86713ef365cb5d699bed2840dc7b8aef6995.tar.gz
prosody-18fc86713ef365cb5d699bed2840dc7b8aef6995.zip
hostmanager, mod_disco: Show optional 'name' option from the config in disco#items queries (fixes use-case in #292) (thanks diSabler, mva)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_disco.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_disco.lua b/plugins/mod_disco.lua
index 6587d435..72c9a34c 100644
--- a/plugins/mod_disco.lua
+++ b/plugins/mod_disco.lua
@@ -111,8 +111,8 @@ module:hook("iq/host/http://jabber.org/protocol/disco#items:query", function(eve
if node and node ~= "" then return; end -- TODO fire event?
local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items");
- for jid in pairs(get_children(module.host)) do
- reply:tag("item", {jid = jid}):up();
+ for jid, name in pairs(get_children(module.host)) do
+ reply:tag("item", {jid = jid, name = name~=true and name or nil}):up();
end
for _, item in ipairs(disco_items) do
reply:tag("item", {jid=item[1], name=item[2]}):up();