81 if success then |
81 if success then |
82 return result; |
82 return result; |
83 end |
83 end |
84 return create_error_response(500, "Error in creating response: "..result); |
84 return create_error_response(500, "Error in creating response: "..result); |
85 end |
85 end |
86 return create_error_response(0, (result and result:gmatch("[^:]*:[^:]*: (.*)")()) or "nil"); |
86 return create_error_response(0, tostring(result):gsub("^[^:]+:%d+: ", "")); |
87 end |
87 end |
88 |
88 |
89 local function handle_xmpp_request(origin, stanza) |
89 local function handle_xmpp_request(origin, stanza) |
90 local query = stanza.tags[1]; |
90 local query = stanza.tags[1]; |
91 if query.name == "query" then |
91 if query.name == "query" then |