# HG changeset patch # User Waqas Hussain # Date 1361905064 -18000 # Node ID eeb24f1e2c84bf4dbed3eb68f99d0623bef12d24 # Parent bb81c13d2c6fafb9b2a7a7fd3e8ce59567f1eef4 mod_proxy65: Only handle service discovery requests when no node is present in the request. diff -r bb81c13d2c6f -r eeb24f1e2c84 plugins/mod_proxy65.lua --- a/plugins/mod_proxy65.lua Tue Feb 26 23:56:44 2013 +0500 +++ b/plugins/mod_proxy65.lua Tue Feb 26 23:57:44 2013 +0500 @@ -106,16 +106,20 @@ module:hook("iq-get/host/http://jabber.org/protocol/disco#info:query", function(event) local origin, stanza = event.origin, event.stanza; - origin.send(st.reply(stanza):query("http://jabber.org/protocol/disco#info") - :tag("identity", {category='proxy', type='bytestreams', name=name}):up() - :tag("feature", {var="http://jabber.org/protocol/bytestreams"}) ); - return true; + if not stanza.tags[1].attr.node then + origin.send(st.reply(stanza):query("http://jabber.org/protocol/disco#info") + :tag("identity", {category='proxy', type='bytestreams', name=name}):up() + :tag("feature", {var="http://jabber.org/protocol/bytestreams"}) ); + return true; + end end, -1); module:hook("iq-get/host/http://jabber.org/protocol/disco#items:query", function(event) local origin, stanza = event.origin, event.stanza; - origin.send(st.reply(stanza):query("http://jabber.org/protocol/disco#items")); - return true; + if not stanza.tags[1].attr.node then + origin.send(st.reply(stanza):query("http://jabber.org/protocol/disco#items")); + return true; + end end, -1); module:hook("iq-get/host/http://jabber.org/protocol/bytestreams:query", function(event)