commit b9f4bea
default
·
2023-08-19 20:05:12 +0000 UTC
parent 76ed295
Only use a Link as an attachment if there are no other.
1 files changed,
+1,
-1
M
html.c
M
html.c
+1,
-1
1@@ -1317,7 +1317,7 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local,
2 continue;
3
4 /* if it's a plain Link, check if it can be "rewritten" */
5- if (strcmp(t, "Link") == 0) {
6+ if (xs_list_len(attach) < 2 && strcmp(t, "Link") == 0) {
7 const char *mt = xs_mime_by_ext(url);
8
9 if (xs_startswith(mt, "image/") ||