mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 22:45:05 +00:00
Only use a Link as an attachment if there are no other.
This commit is contained in:
parent
76ed2957e5
commit
b9f4bea0c9
1 changed files with 1 additions and 1 deletions
2
html.c
2
html.c
|
@ -1317,7 +1317,7 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local,
|
|||
continue;
|
||||
|
||||
/* if it's a plain Link, check if it can be "rewritten" */
|
||||
if (strcmp(t, "Link") == 0) {
|
||||
if (xs_list_len(attach) < 2 && strcmp(t, "Link") == 0) {
|
||||
const char *mt = xs_mime_by_ext(url);
|
||||
|
||||
if (xs_startswith(mt, "image/") ||
|
||||
|
|
Loading…
Reference in a new issue