Software /
code /
prosody
Diff
plugins/mod_disco.lua @ 5081:c0c060e450be
hostmanager, mod_disco: Show optional 'name' option from the config in disco#items queries (fixes use-case in #292) (thanks diSabler, mva)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 05 Aug 2012 17:18:35 +0100 |
parent | 4985:0f72123ff513 |
child | 5627:0439d1349dc1 |
child | 8002:57060d0cee4b |
line wrap: on
line diff
--- a/plugins/mod_disco.lua Fri Aug 03 14:07:41 2012 +0100 +++ b/plugins/mod_disco.lua Sun Aug 05 17:18:35 2012 +0100 @@ -111,8 +111,8 @@ 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();