mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-29 07:53:37 +00:00
Fixed CW dropdown in public instance timeline.
This commit is contained in:
parent
5b8c96e6b6
commit
d668fddd2f
1 changed files with 9 additions and 5 deletions
8
html.c
8
html.c
|
@ -1632,14 +1632,18 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
|
||||||
v = xs_dict_get(msg, "summary");
|
v = xs_dict_get(msg, "summary");
|
||||||
|
|
||||||
/* is it sensitive? */
|
/* is it sensitive? */
|
||||||
if (user && xs_type(xs_dict_get(msg, "sensitive")) == XSTYPE_TRUE) {
|
if (xs_type(xs_dict_get(msg, "sensitive")) == XSTYPE_TRUE) {
|
||||||
if (xs_is_null(v) || *v == '\0')
|
if (xs_is_null(v) || *v == '\0')
|
||||||
v = "...";
|
v = "...";
|
||||||
|
|
||||||
|
const char *cw = "";
|
||||||
|
|
||||||
|
if (user) {
|
||||||
/* only show it when not in the public timeline and the config setting is "open" */
|
/* only show it when not in the public timeline and the config setting is "open" */
|
||||||
const char *cw = xs_dict_get(user->config, "cw");
|
cw = xs_dict_get(user->config, "cw");
|
||||||
if (xs_is_null(cw) || read_only)
|
if (xs_is_null(cw) || read_only)
|
||||||
cw = "";
|
cw = "";
|
||||||
|
}
|
||||||
|
|
||||||
snac_content = xs_html_tag("details",
|
snac_content = xs_html_tag("details",
|
||||||
xs_html_attr(cw, NULL),
|
xs_html_attr(cw, NULL),
|
||||||
|
|
Loading…
Reference in a new issue