aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2011-08-27 12:18:45 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2011-08-27 12:18:45 +0200
commit0fff0b22db8860d3e6165f381028b441f26a31fe (patch)
tree5f68d12a13880fa76d7bb3001bd9b9f0ee9a7f21 /protocols
parent429a9b17fb256e5fc750104f4c5ffb2dc7fba74b (diff)
Just reconstruct all retweets instead of just the ones marked as truncated.
Diffstat (limited to 'protocols')
-rw-r--r--protocols/twitter/twitter_lib.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c
index 7f2fb811..4c680930 100644
--- a/protocols/twitter/twitter_lib.c
+++ b/protocols/twitter/twitter_lib.c
@@ -459,14 +459,11 @@ static xt_status twitter_xt_get_users(struct xt_node *node, struct twitter_xml_l
static xt_status twitter_xt_get_status(struct xt_node *node, struct twitter_xml_status *txs)
{
struct xt_node *child, *rt = NULL;
- gboolean truncated = FALSE;
// Walk over the nodes children.
for (child = node->children; child; child = child->next) {
if (g_strcasecmp("text", child->name) == 0) {
txs->text = g_memdup(child->text, child->text_len + 1);
- } else if (g_strcasecmp("truncated", child->name) == 0 && child->text) {
- truncated = bool2int(child->text);
} else if (g_strcasecmp("retweeted_status", child->name) == 0) {
rt = child;
} else if (g_strcasecmp("created_at", child->name) == 0) {
@@ -487,8 +484,9 @@ static xt_status twitter_xt_get_status(struct xt_node *node, struct twitter_xml_
}
}
- /* If it's a truncated retweet, get the original because dots suck. */
- if (truncated && rt) {
+ /* If it's a (truncated) retweet, get the original. Even if the API claims it
+ wasn't truncated because it may be lying. */
+ if (rt) {
struct twitter_xml_status *rtxs = g_new0(struct twitter_xml_status, 1);
if (twitter_xt_get_status(rt, rtxs) != XT_HANDLED) {
txs_free(rtxs);