Changeset f26d9a3e for protocols/twitter
- Timestamp:
- 2012-11-24T14:10:34Z (12 years ago)
- Branches:
- master
- Children:
- 5f2f728
- Parents:
- c751e51
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter.c
rc751e51 rf26d9a3e 65 65 imcb_log(ic, "Getting initial statuses"); 66 66 67 // Run this once. After this queue the main loop function. 67 // Run this once. After this queue the main loop function (or open the 68 // stream if available). 68 69 twitter_main_loop(ic, -1, 0); 69 70 … … 72 73 us the rest. \o/ */ 73 74 twitter_open_stream(ic); 75 76 /* Stream sends keepalives (empty lines) or actual data at 77 least twice a minute. Disconnect if this stops. */ 74 78 ic->flags |= OPT_PONGS; 75 79 } else { … … 96 100 imcb_log(ic, "Getting contact list"); 97 101 twitter_get_friends_ids(ic, -1); 98 //twitter_get_statuses_friends(ic, -1);99 102 } else 100 103 twitter_main_loop_start(ic); … … 289 292 s = set_add(&acc->set, "strip_newlines", "false", set_eval_bool, acc); 290 293 291 s = set_add(&acc->set, "stream", "true", set_eval_bool, acc); 292 s->flags |= ACC_SET_OFFLINE_ONLY; 294 if (strcmp(acc->prpl->name, "twitter") == 0) { 295 s = set_add(&acc->set, "stream", "true", set_eval_bool, acc); 296 s->flags |= ACC_SET_OFFLINE_ONLY; 297 } 293 298 } 294 299 295 300 /** 296 * Login method. Since the twitter API works with sep erate HTTP request we301 * Login method. Since the twitter API works with separate HTTP request we 297 302 * only save the user and pass to the twitter_data object. 298 303 */ … … 310 315 imc_logout(ic, FALSE); 311 316 return; 317 } 318 319 if (!strstr(url.host, "twitter.com") && 320 set_getbool(&ic->acc->set, "stream")) { 321 imcb_error(ic, "Warning: The streaming API is only supported by Twitter, " 322 "and you seem to be connecting to a different service."); 312 323 } 313 324
Note: See TracChangeset
for help on using the changeset viewer.