diff options
author | Florian Zeitz <florob@babelmonkeys.de> | 2014-02-19 20:13:35 +0100 |
---|---|---|
committer | Florian Zeitz <florob@babelmonkeys.de> | 2014-02-19 20:13:35 +0100 |
commit | 0213c9ded3d5be56806a5e9e528f61bc37331997 (patch) | |
tree | f9a47e0f8c327a1986f3fbb1258ea10dce715bec /plugins | |
parent | e4186638c7e61215b1df2020a98ae5e7dce313f4 (diff) | |
download | prosody-0213c9ded3d5be56806a5e9e528f61bc37331997.tar.gz prosody-0213c9ded3d5be56806a5e9e528f61bc37331997.zip |
mod_proxy65: Use mod_disco
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_proxy65.lua | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/plugins/mod_proxy65.lua b/plugins/mod_proxy65.lua index 2ed9faac..73527cbc 100644 --- a/plugins/mod_proxy65.lua +++ b/plugins/mod_proxy65.lua @@ -101,27 +101,10 @@ function module.add_host(module) module:log("warn", "proxy65_port is deprecated, please put proxy65_ports = { %d } into the global section instead", legacy_config); end + module:depends("disco"); module:add_identity("proxy", "bytestreams", name); module:add_feature("http://jabber.org/protocol/bytestreams"); - module:hook("iq-get/host/http://jabber.org/protocol/disco#info:query", function(event) - local origin, stanza = event.origin, event.stanza; - 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; - 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) local origin, stanza = event.origin, event.stanza; |