Software /
code /
prosody
Changeset
877:0bababc930dd
mod_xmlrpc: Handle RPC stanzas sent over XMPP (XEP-0009: Jabber-RPC)
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 04 Mar 2009 22:22:40 +0500 |
parents | 876:fad020cead52 |
children | 878:72a7eeaa9e58 |
files | plugins/mod_xmlrpc.lua |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_xmlrpc.lua Wed Mar 04 22:15:46 2009 +0500 +++ b/plugins/mod_xmlrpc.lua Wed Mar 04 22:22:40 2009 +0500 @@ -81,7 +81,7 @@ 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 @@ 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);