Ignore:
Timestamp:
2015-01-16T19:50:24Z (6 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.c

    r885d294 r7549d00  
    5151        struct twitter_data *td = ic->proto_data;
    5252
     53        char *last_tweet = set_getstr(&ic->acc->set, "last_tweet");
     54        if (last_tweet)
     55                td->timeline_id = g_ascii_strtoull(last_tweet, NULL, 0);
     56
    5357        /* Create the room now that we "logged in". */
    5458        if (td->flags & TWITTER_MODE_CHAT)
     
    327331        s = set_add(&acc->set, "strip_newlines", "false", set_eval_bool, acc);
    328332       
     333        s = set_add(&acc->set, "last_tweet", "0", NULL, acc);
     334        s->flags |= SET_HIDDEN;
     335
    329336        if (strcmp(acc->prpl->name, "twitter") == 0) {
    330337                s = set_add(&acc->set, "stream", "true", set_eval_bool, acc);
Note: See TracChangeset for help on using the changeset viewer.