mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
Merge branch 'master' into announcements
This commit is contained in:
commit
ac3b5dcbd4
4 changed files with 24 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
16
html.c
16
html.c
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue