mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-13 22:11:02 +00:00
picked the worng id
This commit is contained in:
parent
426d2f7c8f
commit
70421c466e
@ -19,7 +19,7 @@ parse(string body, mapping headers) {
|
|||||||
if (!body || body == "") {
|
if (!body || body == "") {
|
||||||
P1(("%O failed to get its timeline from %O.\n", ME,
|
P1(("%O failed to get its timeline from %O.\n", ME,
|
||||||
previous_object()))
|
previous_object()))
|
||||||
PT(("Got headers: %O", headers))
|
PT(("Got headers: %O\n", headers))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//#if DEBUG > 0
|
//#if DEBUG > 0
|
||||||
@ -31,14 +31,13 @@ parse(string body, mapping headers) {
|
|||||||
P1(("%O failed to parse its timeline.\n", ME))
|
P1(("%O failed to parse its timeline.\n", ME))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
i=sizeof(wurst)-1;
|
if (wurst[0]["id"] <= lastid) {
|
||||||
if (wurst[i]["id"] <= lastid) {
|
P1(("%O received %d old updates.\n", ME, sizeof(wurst)))
|
||||||
P1(("%O received old stuff.\n", ME))
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lastid = wurst[i]["id"];
|
lastid = wurst[0]["id"];
|
||||||
save_object(DATA_PATH "twitter");
|
save_object(DATA_PATH "twitter");
|
||||||
for (; i>=0; i--) {
|
for (i=sizeof(wurst)-1; i>=0; i--) {
|
||||||
d = wurst[i];
|
d = wurst[i];
|
||||||
unless (mappingp(d)) {
|
unless (mappingp(d)) {
|
||||||
P1(("%O got a broken tweet: %O.\n", ME, d))
|
P1(("%O got a broken tweet: %O.\n", ME, d))
|
||||||
@ -53,7 +52,7 @@ parse(string body, mapping headers) {
|
|||||||
P1(("%O got a nickless tweeter.\n", ME))
|
P1(("%O got a nickless tweeter.\n", ME))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
PT((" %O", nick))
|
P4((" %O", nick))
|
||||||
o = find_place(nick);
|
o = find_place(nick);
|
||||||
|
|
||||||
// _notice_update_twitter ?
|
// _notice_update_twitter ?
|
||||||
@ -84,11 +83,13 @@ parse(string body, mapping headers) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fetch() {
|
fetch() {
|
||||||
P3(("%O ready to fetch from %O\n", ME, feed))
|
P1(("%O going to fetch from %O since %O\n", ME, feed, lastid))
|
||||||
call_out( #'fetch, 3 * 59 ); // odd is better
|
call_out( #'fetch, 4 * 59 ); // odd is better
|
||||||
feed -> content( #'parse, 0, 1 );
|
feed -> content( #'parse, 1, 1 );
|
||||||
feed -> fetch("http://twitter.com/statuses/friends_timeline.json"
|
// twitter ignores since_id if count is present. stupid.
|
||||||
"?count="+( lastid? ("23&since_id="+ lastid) : "23"));
|
feed -> fetch("http://twitter.com/statuses/friends_timeline.json?"
|
||||||
|
// +( lastid? ("since_id="+ lastid) : "count=23"));
|
||||||
|
"count="+( lastid? ("23&since_id="+ lastid) : "23"));
|
||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
|
Loading…
Reference in New Issue
Block a user