Changeset

983:ac9bf3fcbcfe

mod_pubsub_feeds, mod_sms_clickatell, mod_twitter: Update for net.http API change in prosody:e3b9dc9dd940
author Matthew Wild <mwild1@gmail.com>
date Fri, 12 Apr 2013 00:33:41 +0100
parents 982:ce8bb0386d08
children 984:c4995b56c358
files mod_pubsub_feeds/mod_pubsub_feeds.lua mod_sms_clickatell/mod_sms_clickatell.lua mod_twitter/mod_twitter.lua
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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));
--- 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;
--- 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;