change load params for identica too

This commit is contained in:
Gabor Adam Toth 2011-08-24 11:11:56 +02:00
parent c9b3d242a3
commit e440532c58
2 changed files with 5 additions and 3 deletions

View File

@ -9,7 +9,7 @@
inherit NET_PATH "twitter/client";
object load(object usr, string key, string secret, string request, string access, string authorize) {
object load(object usr, mapping opts) {
name = "identica";
display_name = "identi.ca";
api_base_url = "http://identi.ca/api";
@ -20,5 +20,5 @@ object load(object usr, string key, string secret, string request, string access
access_token_url = api_base_url + "/oauth/access_token";
authorize_url = api_base_url + "/oauth/authorize";
return ::load(usr, key, secret, request, access, authorize);
return ::load(usr, opts);
}

View File

@ -28,6 +28,8 @@ persistent mixed lastid;
volatile string api_url = "https://api.twitter.com/1";
volatile string userstream_url = "https://userstream.twitter.com/2";
volatile string name = "twitter";
volatile string display_name = "twitter";
volatile int status_max_len = 140;
volatile int send_to_user = 0;
@ -72,7 +74,7 @@ object load(object usr, mapping opts) {
void check_status_update(string body, string headers, int http_status) {
P3(("twitter/client:parse_status_update(%O, %O, %O)\n", body, headers, http_status))
if (http_status != R_OK)
sendmsg(user, "_failure_update_twitter", "Unable to post status update on twitter.");
sendmsg(user, "_failure_update_"+ name, "Unable to post status update on [_name].", (["_name": display_name]));
}
void status_update(string text) {