From b32270030991773c6cafd526f676bd88da5e70f7 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 4 Mar 2009 22:22:40 +0500 Subject: mod_xmlrpc: Handle RPC stanzas sent over XMPP (XEP-0009: Jabber-RPC) --- plugins/mod_xmlrpc.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/mod_xmlrpc.lua b/plugins/mod_xmlrpc.lua index a366dcaf..5a10c377 100644 --- a/plugins/mod_xmlrpc.lua +++ b/plugins/mod_xmlrpc.lua @@ -81,7 +81,7 @@ local function handle_xmlrpc_request(method, args) return create_error_response(0, result or "nil"); end ---[[local function handle_xmpp_request(origin, stanza) +local function handle_xmpp_request(origin, stanza) local query = stanza.tags[1]; if query.name == "query" then if #query.tags == 1 then @@ -99,7 +99,8 @@ end origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); end end -module:add_iq_handler({"c2s", "s2sin"}, "jabber:iq:rpc", handle_xmpp_request);]] +module:add_iq_handler({"c2s", "s2sin"}, "jabber:iq:rpc", handle_xmpp_request); +module:add_feature("jabber:iq:rpc"); local function handle_http_request(method, body, request) local stanza = body and parse_xml(body); -- cgit v1.2.3