diff options
| author | 2025-09-30 09:51:04 +0200 | |
|---|---|---|
| committer | 2025-09-30 09:51:04 +0200 | |
| commit | 1e62e504e1d31e9d7c9e5fa7cd83e5654900941a (patch) | |
| tree | dce4acd54001ebff38186845a4591956fa9e23d9 | |
| parent | Updated RELEASE_NOTES. (diff) | |
| parent | Merge pull request 'CW fix' (#478) from byte/snac2:fix/CW into master (diff) | |
| download | snac2-1e62e504e1d31e9d7c9e5fa7cd83e5654900941a.tar.gz snac2-1e62e504e1d31e9d7c9e5fa7cd83e5654900941a.tar.xz snac2-1e62e504e1d31e9d7c9e5fa7cd83e5654900941a.zip | |
Merge branch 'master' of grunfink-codeberg:grunfink/snac2
| -rw-r--r-- | html.c | 14 |
1 files changed, 3 insertions, 11 deletions
| @@ -2323,8 +2323,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 2323 | 2323 | ||
| 2324 | v = xs_dict_get(msg, "summary"); | 2324 | v = xs_dict_get(msg, "summary"); |
| 2325 | 2325 | ||
| 2326 | /* is it sensitive? */ | 2326 | /* if it has summary or marked as sensitive - add CW */ |
| 2327 | if (xs_type(xs_dict_get(msg, "sensitive")) == XSTYPE_TRUE) { | 2327 | /* come clients don't set "sensitive" flag properly */ |
| 2328 | if ((!xs_is_null(v) && *v) || xs_type(xs_dict_get(msg, "sensitive")) == XSTYPE_TRUE) { | ||
| 2328 | if (xs_is_null(v) || *v == '\0') | 2329 | if (xs_is_null(v) || *v == '\0') |
| 2329 | v = "..."; | 2330 | v = "..."; |
| 2330 | 2331 | ||
| @@ -2344,15 +2345,6 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 2344 | xs_html_text(L(" [SENSITIVE CONTENT]")))); | 2345 | xs_html_text(L(" [SENSITIVE CONTENT]")))); |
| 2345 | } | 2346 | } |
| 2346 | else { | 2347 | else { |
| 2347 | /* print the summary as a header (sites like e.g. Friendica can contain one) */ | ||
| 2348 | if (!has_title && !xs_is_null(v) && *v) { | ||
| 2349 | xs_html_add(snac_content_wrap, | ||
| 2350 | xs_html_tag("h3", | ||
| 2351 | xs_html_attr("class", "snac-entry-title"), | ||
| 2352 | xs_html_text(v))); | ||
| 2353 | |||
| 2354 | has_title = 1; | ||
| 2355 | } | ||
| 2356 | snac_content = xs_html_tag("div", NULL); | 2348 | snac_content = xs_html_tag("div", NULL); |
| 2357 | } | 2349 | } |
| 2358 | 2350 | ||