Changes in protocols/twitter/twitter_lib.c [921ea8b:d11822a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter_lib.c
r921ea8b rd11822a 704 704 static void expand_entities(char **text, const json_value *node, const json_value *extended_node) 705 705 { 706 json_value *entities, *extended_entities, *quoted, *quoted_permalink; 707 char *quote_url = NULL, *quote_text = NULL, *quote_kort = NULL; 708 gboolean quote_used = FALSE; 706 json_value *entities, *extended_entities, *quoted; 707 char *quote_url = NULL, *quote_text = NULL; 709 708 710 709 if (!((entities = json_o_get(node, "entities")) && entities->type == json_object)) … … 717 716 quote_text = g_strdup_printf("@%s: %s", txs->user->screen_name, txs->text); 718 717 quote_url = g_strdup_printf("%s/status/%" G_GUINT64_FORMAT, txs->user->screen_name, txs->id); 719 if ((quoted_permalink = json_o_get(node, "quoted_status_permalink")) && quoted->type == json_object) {720 quote_kort = json_o_strdup(quoted_permalink, "url");721 }722 718 txs_free(txs); 723 719 } else { … … 763 759 format = "%s<%s> [%s]%s"; 764 760 disp = quote_text; 765 quote_used = TRUE;766 761 } 767 762 … … 774 769 } 775 770 } 776 777 if (quote_text && !quote_used) {778 const char *url = quote_kort ?: quote_url;779 char *new = g_strdup_printf("%s <%s>[%s]", *text, url, quote_text);780 g_free(*text);781 *text = new;782 }783 784 771 g_free(quote_text); 785 772 g_free(quote_url); 786 g_free(quote_kort);787 773 } 788 774
Note: See TracChangeset
for help on using the changeset viewer.