aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-07-12 00:14:48 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-07-12 00:14:48 +0500
commit8293d237d5f9701841525fe09e4e76aa0a1ada25 (patch)
tree2cb047e534f804c3a5f68f4ec659265f41152ffb
parent8c6fe5a36d56ceb0040a53bfdaf6189fee5b5d7a (diff)
downloadprosody-8293d237d5f9701841525fe09e4e76aa0a1ada25.tar.gz
prosody-8293d237d5f9701841525fe09e4e76aa0a1ada25.zip
mod_disco: Reflect requested 'node' attribute in the disco#info reply.
-rw-r--r--plugins/mod_disco.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_disco.lua b/plugins/mod_disco.lua
index 984d4599..8bb0afec 100644
--- a/plugins/mod_disco.lua
+++ b/plugins/mod_disco.lua
@@ -88,7 +88,9 @@ module:hook("iq/host/http://jabber.org/protocol/disco#info:query", function(even
if stanza.attr.type ~= "get" then return; end
local node = stanza.tags[1].attr.node;
if node and node ~= "" and node ~= "http://prosody.im#"..get_server_caps_hash() then return; end -- TODO fire event?
- local reply = st.reply(stanza):add_child(get_server_disco_info());
+ local reply_query = get_server_disco_info();
+ reply_query.node = node;
+ local reply = st.reply(stanza):add_child(reply_query);
origin.send(reply);
return true;
end);