diff options
| -rw-r--r-- | RELEASE_NOTES.md | 6 | ||||
| -rw-r--r-- | activitypub.c | 2 | ||||
| -rw-r--r-- | html.c | 16 | ||||
| -rw-r--r-- | mastoapi.c | 2 |
4 files changed, 24 insertions, 2 deletions
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7573246..b0d37f4 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md | |||
| @@ -4,8 +4,14 @@ | |||
| 4 | 4 | ||
| 5 | Markdown-style links are now supported. | 5 | Markdown-style links are now supported. |
| 6 | 6 | ||
| 7 | The alt text in attachments that have one is also shown in a dropdown just below it (useful for environments where mouseover is not available, i.e. for phones and tablets). | ||
| 8 | |||
| 7 | The avatar and/or the header images can now be deleted (contributed by louis77). | 9 | The avatar and/or the header images can now be deleted (contributed by louis77). |
| 8 | 10 | ||
| 11 | Code cleaning: HTTP status codes use names instead of hardcoded integers (contributed by louis77). | ||
| 12 | |||
| 13 | Mastodon API: some fixes for Mona and Tokodon apps, user credentials can now be edited from apps (contributed by louis77). | ||
| 14 | |||
| 9 | The webfinger content-type response header is now RFC-compliant (contributed by steve-bate). | 15 | The webfinger content-type response header is now RFC-compliant (contributed by steve-bate). |
| 10 | 16 | ||
| 11 | ## 2.53 | 17 | ## 2.53 |
diff --git a/activitypub.c b/activitypub.c index 4247078..212dd2f 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -239,7 +239,7 @@ xs_list *get_attachments(const xs_dict *msg) | |||
| 239 | if (xs_is_null(name)) | 239 | if (xs_is_null(name)) |
| 240 | name = xs_dict_get(msg, "name"); | 240 | name = xs_dict_get(msg, "name"); |
| 241 | if (xs_is_null(name)) | 241 | if (xs_is_null(name)) |
| 242 | name = L("No description"); | 242 | name = ""; |
| 243 | 243 | ||
| 244 | xs *d = xs_dict_new(); | 244 | xs *d = xs_dict_new(); |
| 245 | d = xs_dict_append(d, "type", type); | 245 | d = xs_dict_append(d, "type", type); |
| @@ -1891,6 +1891,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1891 | xs_html_tag("a", | 1891 | xs_html_tag("a", |
| 1892 | xs_html_attr("href", href), | 1892 | xs_html_attr("href", href), |
| 1893 | xs_html_text(href)))); | 1893 | xs_html_text(href)))); |
| 1894 | |||
| 1895 | /* do not generate an Alt... */ | ||
| 1896 | name = NULL; | ||
| 1894 | } | 1897 | } |
| 1895 | else { | 1898 | else { |
| 1896 | xs_html_add(content_attachments, | 1899 | xs_html_add(content_attachments, |
| @@ -1900,6 +1903,19 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1900 | xs_html_text(L("Attachment")), | 1903 | xs_html_text(L("Attachment")), |
| 1901 | xs_html_text(": "), | 1904 | xs_html_text(": "), |
| 1902 | xs_html_text(href)))); | 1905 | xs_html_text(href)))); |
| 1906 | |||
| 1907 | /* do not generate an Alt... */ | ||
| 1908 | name = NULL; | ||
| 1909 | } | ||
| 1910 | |||
| 1911 | if (name != NULL && *name) { | ||
| 1912 | xs_html_add(content_attachments, | ||
| 1913 | xs_html_tag("p", | ||
| 1914 | xs_html_attr("class", "snac-alt-text"), | ||
| 1915 | xs_html_tag("details", | ||
| 1916 | xs_html_tag("summary", | ||
| 1917 | xs_html_text(L("Alt..."))), | ||
| 1918 | xs_html_text(name)))); | ||
| 1903 | } | 1919 | } |
| 1904 | } | 1920 | } |
| 1905 | } | 1921 | } |
| @@ -3192,7 +3192,7 @@ int mastoapi_patch_handler(const xs_dict *req, const char *q_path, | |||
| 3192 | const xs_str *k; | 3192 | const xs_str *k; |
| 3193 | const xs_val *v; | 3193 | const xs_val *v; |
| 3194 | const xs_str *field_name = NULL; | 3194 | const xs_str *field_name = NULL; |
| 3195 | xs_dict *new_fields = xs_dict_new(); | 3195 | xs *new_fields = xs_dict_new(); |
| 3196 | while (xs_dict_next(args, &k, &v, &c)) { | 3196 | while (xs_dict_next(args, &k, &v, &c)) { |
| 3197 | if (strcmp(k, "display_name") == 0) { | 3197 | if (strcmp(k, "display_name") == 0) { |
| 3198 | if (v != NULL) | 3198 | if (v != NULL) |