Ignore:
Timestamp:
2018-03-10T11:30:39Z (6 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
5447c59
Parents:
3f44e43 (diff), 4a9c6b0 (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 branch 'master' into HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r3f44e43 r7a9d968  
    239239        if ((ret = json_parse_string(req->reply_body)) == NULL) {
    240240                imcb_error(ic, "Could not retrieve %s: %s",
    241                            path, "XML parse error");
     241                           path, "JSON parse error");
    242242        }
    243243        return ret;
     
    310310
    311311                txl->list = g_slist_prepend(txl->list,
    312                                             g_strdup_printf("%lld", id));
     312                                            g_strdup_printf("%" PRIu64, id);
    313313        }
    314314
     
    443443        txl = g_new0(struct twitter_xml_list, 1);
    444444        txl->list = td->noretweets_ids;
    445        
     445
    446446        // Process the retweet ids
    447447        txl->type = TXL_ID;
     
    452452                        jint id = json_array_get_integer(arr, i);
    453453                        txl->list = g_slist_prepend(txl->list,
    454                                                     g_strdup_printf("%lld", id));
     454                                                    g_strdup_printf("%" PRId64, id));
    455455                }
    456456        }
     
    713713                return;
    714714        if ((quoted = json_object_get_object(node, "quoted_status"))) {
    715                 /* New "retweets with comments" feature. Note that this info
    716                  * seems to be included in the streaming API only! Grab the
     715                /* New "retweets with comments" feature. Grab the
    717716                 * full message and try to insert it when we run into the
    718717                 * Tweet entity. */
     
    755754                        char *pos, *new;
    756755
    757                         if (!kort || !disp || !(pos = strstr(*text, kort))) {
     756                        /* Skip if a required field is missing, if the t.co URL is not in fact
     757                           in the Tweet at all, or if the full-ish one *is* in it already
     758                           (dupes appear, especially in streaming API). */
     759                        if (!kort || !disp || !(pos = strstr(*text, kort)) || strstr(*text, disp)) {
    758760                                continue;
    759761                        }
     
    980982                return;
    981983        }
    982        
     984
    983985        /* Check this is not a tweet that should be muted */
    984986        uid_str = g_strdup_printf("%" G_GUINT64_FORMAT, status->user->uid);
     
    16911693        };
    16921694
     1695        if (set_getbool(&ic->acc->set, "in_korea") && !in_reply_to) {
     1696                g_free(args[3]);
     1697                args[2] = "place_id";
     1698                args[3] = g_strdup("c999e6a453e9ef72");
     1699                in_reply_to = 1;
     1700        }
     1701
    16931702        twitter_http(ic, TWITTER_STATUS_UPDATE_URL, twitter_http_post, ic, 1,
    16941703                     args, in_reply_to ? 4 : 2);
Note: See TracChangeset for help on using the changeset viewer.