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 @@ Markdown-style links are now supported. +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). + The avatar and/or the header images can now be deleted (contributed by louis77). +Code cleaning: HTTP status codes use names instead of hardcoded integers (contributed by louis77). + +Mastodon API: some fixes for Mona and Tokodon apps, user credentials can now be edited from apps (contributed by louis77). + The webfinger content-type response header is now RFC-compliant (contributed by steve-bate). ## 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) if (xs_is_null(name)) name = xs_dict_get(msg, "name"); if (xs_is_null(name)) - name = L("No description"); + name = ""; xs *d = xs_dict_new(); d = xs_dict_append(d, "type", type); @@ -1909,6 +1909,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, xs_html_tag("a", xs_html_attr("href", href), xs_html_text(href)))); + + /* do not generate an Alt... */ + name = NULL; } else { xs_html_add(content_attachments, @@ -1918,6 +1921,19 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, xs_html_text(L("Attachment")), xs_html_text(": "), xs_html_text(href)))); + + /* do not generate an Alt... */ + name = NULL; + } + + if (name != NULL && *name) { + xs_html_add(content_attachments, + xs_html_tag("p", + xs_html_attr("class", "snac-alt-text"), + xs_html_tag("details", + xs_html_tag("summary", + xs_html_text(L("Alt..."))), + xs_html_text(name)))); } } } @@ -3215,7 +3215,7 @@ int mastoapi_patch_handler(const xs_dict *req, const char *q_path, const xs_str *k; const xs_val *v; const xs_str *field_name = NULL; - xs_dict *new_fields = xs_dict_new(); + xs *new_fields = xs_dict_new(); while (xs_dict_next(args, &k, &v, &c)) { if (strcmp(k, "display_name") == 0) { if (v != NULL) |