diff options
| author | 2024-05-30 22:38:05 +0000 | |
|---|---|---|
| committer | 2024-05-30 22:38:05 +0000 | |
| commit | ac3b5dcbd472b533ec543331692921b804fd02e4 (patch) | |
| tree | 617f5c6a099298a92fe7ff2ca42543b933905d4e | |
| parent | Implement instance announcements (diff) | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | penes-snac2-ac3b5dcbd472b533ec543331692921b804fd02e4.tar.gz penes-snac2-ac3b5dcbd472b533ec543331692921b804fd02e4.tar.xz penes-snac2-ac3b5dcbd472b533ec543331692921b804fd02e4.zip | |
Merge branch 'master' into announcements
| -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); |
| @@ -1909,6 +1909,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1909 | xs_html_tag("a", | 1909 | xs_html_tag("a", |
| 1910 | xs_html_attr("href", href), | 1910 | xs_html_attr("href", href), |
| 1911 | xs_html_text(href)))); | 1911 | xs_html_text(href)))); |
| 1912 | |||
| 1913 | /* do not generate an Alt... */ | ||
| 1914 | name = NULL; | ||
| 1912 | } | 1915 | } |
| 1913 | else { | 1916 | else { |
| 1914 | xs_html_add(content_attachments, | 1917 | xs_html_add(content_attachments, |
| @@ -1918,6 +1921,19 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1918 | xs_html_text(L("Attachment")), | 1921 | xs_html_text(L("Attachment")), |
| 1919 | xs_html_text(": "), | 1922 | xs_html_text(": "), |
| 1920 | xs_html_text(href)))); | 1923 | xs_html_text(href)))); |
| 1924 | |||
| 1925 | /* do not generate an Alt... */ | ||
| 1926 | name = NULL; | ||
| 1927 | } | ||
| 1928 | |||
| 1929 | if (name != NULL && *name) { | ||
| 1930 | xs_html_add(content_attachments, | ||
| 1931 | xs_html_tag("p", | ||
| 1932 | xs_html_attr("class", "snac-alt-text"), | ||
| 1933 | xs_html_tag("details", | ||
| 1934 | xs_html_tag("summary", | ||
| 1935 | xs_html_text(L("Alt..."))), | ||
| 1936 | xs_html_text(name)))); | ||
| 1921 | } | 1937 | } |
| 1922 | } | 1938 | } |
| 1923 | } | 1939 | } |
| @@ -3215,7 +3215,7 @@ int mastoapi_patch_handler(const xs_dict *req, const char *q_path, | |||
| 3215 | const xs_str *k; | 3215 | const xs_str *k; |
| 3216 | const xs_val *v; | 3216 | const xs_val *v; |
| 3217 | const xs_str *field_name = NULL; | 3217 | const xs_str *field_name = NULL; |
| 3218 | xs_dict *new_fields = xs_dict_new(); | 3218 | xs *new_fields = xs_dict_new(); |
| 3219 | while (xs_dict_next(args, &k, &v, &c)) { | 3219 | while (xs_dict_next(args, &k, &v, &c)) { |
| 3220 | if (strcmp(k, "display_name") == 0) { | 3220 | if (strcmp(k, "display_name") == 0) { |
| 3221 | if (v != NULL) | 3221 | if (v != NULL) |