Ignore:
Timestamp:
2016-11-20T08:40:36Z (8 years ago)
Author:
dequis <dx@…>
Children:
3f44e43
Parents:
ba52ac5 (diff), 9f03c47 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge master up to commit '9f03c47' into parson

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.c

    rba52ac5 r537d9b9  
    345345                imcb_log(ic, "Getting contact list");
    346346                twitter_get_friends_ids(ic, -1);
     347                twitter_get_mutes_ids(ic, -1);
     348                twitter_get_noretweets_ids(ic, -1);
    347349        } else {
    348350                twitter_main_loop_start(ic);
     
    469471        g_regex_match(regex, msg, 0, &match_info);
    470472        while (g_match_info_matches(match_info)) {
    471                 gchar *s, *url;
     473                gchar *url;
    472474
    473475                url = g_match_info_fetch(match_info, 2);
    474476                url_len_diff += target_len - g_utf8_strlen(url, -1);
    475477
    476                 /* Add another character for https://t.co/... URLs */
    477                 if ((s = g_match_info_fetch(match_info, 3))) {
    478                         url_len_diff += 1;
    479                         g_free(s);
    480                 }
    481478                g_free(url);
    482479                g_match_info_next(match_info, NULL);
     
    541538        if (strcmp(acc->prpl->name, "twitter") == 0) {
    542539                def_url = TWITTER_API_URL;
    543                 def_tul = "22";
     540                def_tul = "23";
    544541                def_mentions = "true";
    545542        } else {                /* if( strcmp( acc->prpl->name, "identica" ) == 0 ) */
     
    690687                }
    691688
     689                g_slist_foreach(td->mutes_ids, (GFunc) g_free, NULL);
     690                g_slist_free(td->mutes_ids);
     691
     692                g_slist_foreach(td->noretweets_ids, (GFunc) g_free, NULL);
     693                g_slist_free(td->noretweets_ids);
     694
    692695                http_close(td->stream);
    693696                twitter_filter_remove_all(ic);
     
    948951        } else if ((g_strcasecmp(cmd[0], "favourite") == 0 ||
    949952                    g_strcasecmp(cmd[0], "favorite") == 0 ||
    950                     g_strcasecmp(cmd[0], "fav") == 0) && cmd[1]) {
     953                    g_strcasecmp(cmd[0], "fav") == 0 ||
     954                    g_strcasecmp(cmd[0], "like") == 0) && cmd[1]) {
    951955                if ((id = twitter_message_id_from_command_arg(ic, cmd[1], NULL))) {
    952956                        twitter_favourite_tweet(ic, id);
     
    960964        } else if (g_strcasecmp(cmd[0], "unfollow") == 0 && cmd[1]) {
    961965                twitter_remove_buddy(ic, cmd[1], NULL);
     966                goto eof;
     967        } else if (g_strcasecmp(cmd[0], "mute") == 0 && cmd[1]) {
     968                twitter_mute_create_destroy(ic, cmd[1], 1);
     969                goto eof;
     970        } else if (g_strcasecmp(cmd[0], "unmute") == 0 && cmd[1]) {
     971                twitter_mute_create_destroy(ic, cmd[1], 0);
    962972                goto eof;
    963973        } else if ((g_strcasecmp(cmd[0], "report") == 0 ||
     
    10821092        struct prpl *ret = g_new0(struct prpl, 1);
    10831093
    1084         ret->options = OPT_NOOTR;
     1094        ret->options = PRPL_OPT_NOOTR | PRPL_OPT_NO_PASSWORD;
    10851095        ret->name = "twitter";
    10861096        ret->login = twitter_login;
     
    11091119        ret = g_memdup(ret, sizeof(struct prpl));
    11101120        ret->name = "identica";
     1121        ret->options =  PRPL_OPT_NOOTR;
    11111122        register_protocol(ret);
    11121123}
Note: See TracChangeset for help on using the changeset viewer.