# HG changeset patch # User Matthew Wild # Date 1365723221 -3600 # Node ID ac9bf3fcbcfe14e68e88de4bfb5504d25ea68b5e # Parent ce8bb0386d082ea391484d3b1e9ec6f9f0fb2912 mod_pubsub_feeds, mod_sms_clickatell, mod_twitter: Update for net.http API change in prosody:e3b9dc9dd940 diff -r ce8bb0386d08 -r ac9bf3fcbcfe mod_pubsub_feeds/mod_pubsub_feeds.lua --- a/mod_pubsub_feeds/mod_pubsub_feeds.lua Thu Apr 11 21:39:03 2013 +0200 +++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua Fri Apr 12 00:33:41 2013 +0100 @@ -129,7 +129,7 @@ if item.data and item.last_update then headers["If-Modified-Since"] = date("!%a, %d %b %Y %H:%M:%S %Z", item.last_update); end - http.request(item.url, { headers = headers }, function(data, code, req) + http.request(item.url, { headers = headers }, function(data, code) if code == 200 then item.data = data; if callback then callback(item) end @@ -176,7 +176,7 @@ --FIXME The subscription states and related stuff feed.subscription = want; - http.request(feed.hub, { body = body }, function(data, code, req) + http.request(feed.hub, { body = body }, function(data, code) module:log("debug", "subscription to %s submitted, status %s", feed.node, tostring(code)); if code >= 400 then module:log("error", "There was something wrong with our subscription request, body: %s", tostring(data)); diff -r ce8bb0386d08 -r ac9bf3fcbcfe mod_sms_clickatell/mod_sms_clickatell.lua --- a/mod_sms_clickatell/mod_sms_clickatell.lua Thu Apr 11 21:39:03 2013 +0200 +++ b/mod_sms_clickatell/mod_sms_clickatell.lua Fri Apr 12 00:33:41 2013 +0100 @@ -200,7 +200,7 @@ end function http_add_action(tid, url, method, post, fcallback) - local request = http.request(url, { headers = http_headers or {}, body = "", method = method or "GET" }, function(response, code, request) http_action_callback(response, code, request, fcallback) end); + local request = http.request(url, { headers = http_headers or {}, body = "", method = method or "GET" }, function(response_body, code, response, request) http_action_callback(response_body, code, request, fcallback) end); http_queue[request] = tid; timer.add_task(http_timeout, function() http.destroy_request(request); end); return true; diff -r ce8bb0386d08 -r ac9bf3fcbcfe mod_twitter/mod_twitter.lua --- a/mod_twitter/mod_twitter.lua Thu Apr 11 21:39:03 2013 +0200 +++ b/mod_twitter/mod_twitter.lua Fri Apr 12 00:33:41 2013 +0100 @@ -73,7 +73,7 @@ end function http_add_action(tid, url, method, post, fcallback) - local request = http.request(url, { headers = http_headers or {}, body = http.formencode(post or {}), method = method or "GET" }, function(response, code, request) http_action_callback(response, code, request, fcallback) end); + local request = http.request(url, { headers = http_headers or {}, body = http.formencode(post or {}), method = method or "GET" }, function(response_body, code, response, request) http_action_callback(response_body, code, request, fcallback) end); http_queue[request] = tid; timer.add_task(http_timeout, function() http.destroy_request(request); end); return true;