Changeset a685409 for protocols/twitter


Ignore:
Timestamp:
2013-07-13T18:49:13Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
81265e0, d4a4f1a
Parents:
c92ee728
Message:

Update to deal with a not-so-recent regression in the Twitter URL lenghtening
service. https://dev.twitter.com/blog/upcoming-tco-changes #1077

Seriously guys, stop being so obnoxious. This t.co garbage lengthens pretty
much everything (that looks like a) URL at this point. Stop counting it towards
the 140-char limit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.c

    rc92ee728 ra685409  
    238238                gchar *url = g_match_info_fetch(match_info, 2);
    239239                url_len_diff += target_len - g_utf8_strlen(url, -1);
     240                /* Add another character for https://t.co/... URLs */
    240241                if (g_match_info_fetch(match_info, 3) != NULL)
    241242                        url_len_diff += 1;
     
    253254        int target_len = set_getint(&ic->acc->set, "target_url_length");
    254255        int url_len_diff = 0;
    255    
     256
    256257        if (target_len > 0)
    257258                url_len_diff = twitter_url_len_diff(msg, target_len);
     
    291292        if (strcmp(acc->prpl->name, "twitter") == 0) {
    292293                def_url = TWITTER_API_URL;
    293                 def_tul = "20";
     294                def_tul = "22";
    294295                def_mentions = "true";
    295296        } else {                /* if( strcmp( acc->prpl->name, "identica" ) == 0 ) */
Note: See TracChangeset for help on using the changeset viewer.