58 end |
58 end |
59 end |
59 end |
60 return stanza.tags[1]; |
60 return stanza.tags[1]; |
61 end |
61 end |
62 |
62 |
63 local function get_method(method) |
63 --[[local function get_method(method) |
64 return function(...) |
64 return function(...) |
65 return {method = method; args = {...}}; |
65 return {method = method; args = {...}}; |
66 end |
66 end |
67 end |
67 end]] |
|
68 local get_method = require "core.objectmanager".get_object; |
68 |
69 |
69 local function handle_xmlrpc_request(method, args) |
70 local function handle_xmlrpc_request(method, args) |
70 method = get_method(method); |
71 method = get_method(method); |
71 if not method then return create_error_response(404, "method not found"); end |
72 if not method then return create_error_response(404, "method not found"); end |
72 args = args or {}; |
73 args = args or {}; |