Changeset e193aeb for protocols/twitter
- Timestamp:
- 2010-08-07T13:08:46Z (14 years ago)
- Branches:
- master
- Children:
- 289bd2d
- Parents:
- bf2ebd8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter_lib.c
rbf2ebd8 re193aeb 365 365 static xt_status twitter_xt_get_status( struct xt_node *node, struct twitter_xml_status *txs ) 366 366 { 367 struct xt_node *child; 367 struct xt_node *child, *rt; 368 gboolean truncated = FALSE; 368 369 369 370 // Walk over the nodes children. … … 373 374 { 374 375 txs->text = g_memdup( child->text, child->text_len + 1 ); 376 } 377 else if (g_strcasecmp( "truncated", child->name ) == 0 && child->text) 378 { 379 truncated = bool2int(child->text); 380 } 381 else if (g_strcasecmp( "retweeted_status", child->name ) == 0) 382 { 383 rt = child; 375 384 } 376 385 else if (g_strcasecmp( "created_at", child->name ) == 0) … … 394 403 } 395 404 } 405 406 /* If it's a truncated retweet, get the original because dots suck. */ 407 if (truncated && rt) 408 { 409 struct twitter_xml_status *rtxs = g_new0(struct twitter_xml_status, 1); 410 if (twitter_xt_get_status(rt, rtxs) != XT_HANDLED) 411 { 412 txs_free(rtxs); 413 return XT_HANDLED; 414 } 415 416 g_free(txs->text); 417 txs->text = g_strdup_printf("RT @%s: %s", rtxs->user->screen_name, rtxs->text); 418 txs_free(rtxs); 419 } 420 396 421 return XT_HANDLED; 397 422 }
Note: See TracChangeset
for help on using the changeset viewer.