Ignore:
Timestamp:
2015-01-16T19:50:24Z (5 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
25c4c78
Parents:
885d294
git-author:
roger <roger@…> (16-01-15 19:50:24)
git-committer:
dequis <dx@…> (16-01-15 19:50:24)
Message:

twitter: start stream from last tweet on connect/reconnect

This works by setting the last_tweet hidden account setting to the ID of
the last shown tweet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r885d294 r7549d00  
    721721{
    722722        struct twitter_data *td = ic->proto_data;
     723        char *last_id_str;
    723724       
    724725        if (status->user == NULL || status->text == NULL)
     
    738739        // we won't pick up the updates already in the list.
    739740        td->timeline_id = MAX(td->timeline_id, status->rt_id);
     741
     742        last_id_str = g_strdup_printf("%" G_GUINT64_FORMAT, td->timeline_id);
     743        set_setstr(&ic->acc->set, "last_tweet", last_id_str);
     744        g_free(last_id_str);
    740745}
    741746
     
    10021007        if (td->timeline_id) {
    10031008                args[4] = "since_id";
    1004                 args[5] = g_strdup_printf("%llu", (long long unsigned int) td->timeline_id);
     1009                args[5] = g_strdup_printf("%" G_GUINT64_FORMAT, td->timeline_id);
    10051010        }
    10061011
Note: See TracChangeset for help on using the changeset viewer.