Changeset b5fe39b for protocols/twitter
- Timestamp:
- 2012-02-10T23:49:28Z (13 years ago)
- Branches:
- master
- Children:
- 00d6760
- Parents:
- fc0640e
- Location:
- protocols/twitter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter.c
rfc0640e rb5fe39b 279 279 s->flags |= ACC_SET_OFFLINE_ONLY; 280 280 281 s = set_add(&acc->set, "show_old_mentions", " true", set_eval_bool, acc);281 s = set_add(&acc->set, "show_old_mentions", "20", set_eval_int, acc); 282 282 283 283 s = set_add(&acc->set, "strip_newlines", "false", set_eval_bool, acc); -
protocols/twitter/twitter_lib.c
rfc0640e rb5fe39b 752 752 struct twitter_data *td = ic->proto_data; 753 753 gboolean include_mentions = set_getbool(&ic->acc->set, "fetch_mentions"); 754 gboolean show_old_mentions = set_getbool(&ic->acc->set, "show_old_mentions");754 int show_old_mentions = set_getint(&ic->acc->set, "show_old_mentions"); 755 755 struct twitter_xml_list *home_timeline = td->home_timeline_obj; 756 756 struct twitter_xml_list *mentions = td->mentions_obj; … … 774 774 if (include_mentions && mentions && mentions->list) { 775 775 for (l = mentions->list; l; l = g_slist_next(l)) { 776 if ( !show_old_mentions&& output && twitter_compare_elements(l->data, output->data) < 0) {776 if (show_old_mentions < 1 && output && twitter_compare_elements(l->data, output->data) < 0) { 777 777 continue; 778 778 } … … 852 852 args[4] = "since_id"; 853 853 args[5] = g_strdup_printf("%llu", (long long unsigned int) td->timeline_id); 854 } 855 856 if (twitter_http(ic, TWITTER_MENTIONS_URL, twitter_http_get_mentions, ic, 0, args, 857 td->timeline_id ? 6 : 4) == NULL) { 854 } else { 855 args[4] = "count"; 856 args[5] = g_strdup_printf("%d", set_getint(&ic->acc->set, "show_old_mentions")); 857 } 858 859 if (twitter_http(ic, TWITTER_MENTIONS_URL, twitter_http_get_mentions, 860 ic, 0, args, 6) == NULL) { 858 861 if (++td->http_fails >= 5) 859 862 imcb_error(ic, "Could not retrieve %s: %s",
Note: See TracChangeset
for help on using the changeset viewer.