- Timestamp:
- 2012-11-25T12:05:48Z (12 years ago)
- Branches:
- master
- Children:
- 96dd574
- Parents:
- 898c08e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter_lib.c
r898c08e r2cd8540 515 515 * Function to fill a twitter_xml_status struct (DM variant). 516 516 */ 517 static gboolean twitter_xt_get_dm(const json_value *node, struct twitter_xml_status *txs) 518 { 517 static struct twitter_xml_status *twitter_xt_get_dm(const json_value *node) 518 { 519 struct twitter_xml_status *txs; 519 520 const json_value *entities = NULL; 520 521 521 522 if (node->type != json_object) 522 523 return FALSE; 524 txs = g_new0(struct twitter_xml_status, 1); 523 525 524 526 JSON_O_FOREACH (node, k, v) { … … 544 546 } 545 547 546 return txs->text && txs->user && txs->id; 548 if (txs->text && txs->user && txs->id) 549 return txs; 550 551 txs_free(txs); 552 return NULL; 547 553 } 548 554 … … 847 853 return twitter_stream_handle_status(ic, txs); 848 854 } else if ((c = json_o_get(o, "direct_message")) && 849 twitter_xt_get_dm(c, txs)) { 850 GSList *output = g_slist_append(NULL, txs); 851 twitter_private_message_chat(ic, output); 855 (txs = twitter_xt_get_dm(c))) { 856 if (strcmp(txs->user->screen_name, td->user) != 0) 857 imcb_buddy_msg(ic, txs->user->screen_name, 858 txs->text, 0, txs->created_at); 852 859 txs_free(txs); 853 g_slist_free(output);854 860 return TRUE; 855 861 } else if ((c = json_o_get(o, "event")) && c->type == json_string) {
Note: See TracChangeset
for help on using the changeset viewer.