Changeset 3b0c1c3
- Timestamp:
- 2018-07-31T06:17:21Z (6 years ago)
- Branches:
- master
- Children:
- 0b1448f
- Parents:
- fa1bc1d (diff), 921ea8b (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter_lib.c
rfa1bc1d r3b0c1c3 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; 707 char *quote_url = NULL, *quote_text = NULL; 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; 708 709 709 710 if (!((entities = json_o_get(node, "entities")) && entities->type == json_object)) … … 716 717 quote_text = g_strdup_printf("@%s: %s", txs->user->screen_name, txs->text); 717 718 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 } 718 722 txs_free(txs); 719 723 } else { … … 759 763 format = "%s<%s> [%s]%s"; 760 764 disp = quote_text; 765 quote_used = TRUE; 761 766 } 762 767 … … 769 774 } 770 775 } 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 771 784 g_free(quote_text); 772 785 g_free(quote_url); 786 g_free(quote_kort); 773 787 } 774 788
Note: See TracChangeset
for help on using the changeset viewer.