From b9f4bea0c9ba5f4cd60843a7ee5f93bc1658d613 Mon Sep 17 00:00:00 2001 From: default Date: Sat, 19 Aug 2023 22:05:12 +0200 Subject: [PATCH] Only use a Link as an attachment if there are no other. --- html.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, 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/") ||