summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-08-19 22:05:12 +0200
committerGravatar default2023-08-19 22:05:12 +0200
commitb9f4bea0c9ba5f4cd60843a7ee5f93bc1658d613 (patch)
tree7e16d620518872ed91a2267c3d10e4653d20649b
parentUpdated RELEASE_NOTES. (diff)
downloadsnac2-b9f4bea0c9ba5f4cd60843a7ee5f93bc1658d613.tar.gz
snac2-b9f4bea0c9ba5f4cd60843a7ee5f93bc1658d613.tar.xz
snac2-b9f4bea0c9ba5f4cd60843a7ee5f93bc1658d613.zip
Only use a Link as an attachment if there are no other.
-rw-r--r--html.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/html.c b/html.c
index e7e1d97..c9793a6 100644
--- a/html.c
+++ b/html.c
@@ -1317,7 +1317,7 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local,
1317 continue; 1317 continue;
1318 1318
1319 /* if it's a plain Link, check if it can be "rewritten" */ 1319 /* if it's a plain Link, check if it can be "rewritten" */
1320 if (strcmp(t, "Link") == 0) { 1320 if (xs_list_len(attach) < 2 && strcmp(t, "Link") == 0) {
1321 const char *mt = xs_mime_by_ext(url); 1321 const char *mt = xs_mime_by_ext(url);
1322 1322
1323 if (xs_startswith(mt, "image/") || 1323 if (xs_startswith(mt, "image/") ||