diff options
| author | 2025-03-17 08:24:37 +0100 | |
|---|---|---|
| committer | 2025-03-17 08:24:37 +0100 | |
| commit | b5f0b4ba2d45165cc2a70ac5d35d545cb039749d (patch) | |
| tree | d1c4a586631ffb9dd0a8d2a3413622940b1c41af /mastoapi.c | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | penes-snac2-b5f0b4ba2d45165cc2a70ac5d35d545cb039749d.tar.gz penes-snac2-b5f0b4ba2d45165cc2a70ac5d35d545cb039749d.tar.xz penes-snac2-b5f0b4ba2d45165cc2a70ac5d35d545cb039749d.zip | |
Minor tweak.
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -2125,9 +2125,8 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 2125 | xs *current = xs_dict_new(); | 2125 | xs *current = xs_dict_new(); |
| 2126 | if (xs_startswith(v, "https://") && xs_startswith((xs_mime_by_ext(v)), "image/")) { | 2126 | if (xs_startswith(v, "https://") && xs_startswith((xs_mime_by_ext(v)), "image/")) { |
| 2127 | /* remove first and last colon */ | 2127 | /* remove first and last colon */ |
| 2128 | char *shortcode = (char *)k; | 2128 | xs *shortcode = xs_replace(k, ":", ""); |
| 2129 | shortcode[strlen(k) - 1] = '\0'; | 2129 | current = xs_dict_append(current, "shortcode", shortcode); |
| 2130 | current = xs_dict_append(current, "shortcode", shortcode + 1); | ||
| 2131 | current = xs_dict_append(current, "url", v); | 2130 | current = xs_dict_append(current, "url", v); |
| 2132 | current = xs_dict_append(current, "static_url", v); | 2131 | current = xs_dict_append(current, "static_url", v); |
| 2133 | current = xs_dict_append(current, "visible_in_picker", xs_stock(XSTYPE_TRUE)); | 2132 | current = xs_dict_append(current, "visible_in_picker", xs_stock(XSTYPE_TRUE)); |