commit 1e62e50

grunfink  ·  2025-09-30 07:51:04 +0000 UTC
parents 5c958b5, 02e028b
Merge branch 'master' of grunfink-codeberg:grunfink/snac2
1 files changed,  +3, -11
M html.c
M html.c
+3, -11
 1@@ -2323,8 +2323,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
 2 
 3     v = xs_dict_get(msg, "summary");
 4 
 5-    /* is it sensitive? */
 6-    if (xs_type(xs_dict_get(msg, "sensitive")) == XSTYPE_TRUE) {
 7+    /* if it has summary or marked as sensitive - add CW */
 8+    /* come clients don't set "sensitive" flag properly */
 9+    if ((!xs_is_null(v) && *v) || xs_type(xs_dict_get(msg, "sensitive")) == XSTYPE_TRUE) {
10         if (xs_is_null(v) || *v == '\0')
11             v = "...";
12 
13@@ -2344,15 +2345,6 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
14                 xs_html_text(L(" [SENSITIVE CONTENT]"))));
15     }
16     else {
17-        /* print the summary as a header (sites like e.g. Friendica can contain one) */
18-        if (!has_title && !xs_is_null(v) && *v) {
19-            xs_html_add(snac_content_wrap,
20-                xs_html_tag("h3",
21-                    xs_html_attr("class", "snac-entry-title"),
22-                    xs_html_text(v)));
23-
24-            has_title = 1;
25-        }
26         snac_content = xs_html_tag("div", NULL);
27     }
28