summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/html.c b/html.c
index 0c66917..0d157c8 100644
--- a/html.c
+++ b/html.c
@@ -1632,14 +1632,18 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
1632 v = xs_dict_get(msg, "summary"); 1632 v = xs_dict_get(msg, "summary");
1633 1633
1634 /* is it sensitive? */ 1634 /* is it sensitive? */
1635 if (user && xs_type(xs_dict_get(msg, "sensitive")) == XSTYPE_TRUE) { 1635 if (xs_type(xs_dict_get(msg, "sensitive")) == XSTYPE_TRUE) {
1636 if (xs_is_null(v) || *v == '\0') 1636 if (xs_is_null(v) || *v == '\0')
1637 v = "..."; 1637 v = "...";
1638 1638
1639 /* only show it when not in the public timeline and the config setting is "open" */ 1639 const char *cw = "";
1640 const char *cw = xs_dict_get(user->config, "cw"); 1640
1641 if (xs_is_null(cw) || read_only) 1641 if (user) {
1642 cw = ""; 1642 /* only show it when not in the public timeline and the config setting is "open" */
1643 cw = xs_dict_get(user->config, "cw");
1644 if (xs_is_null(cw) || read_only)
1645 cw = "";
1646 }
1643 1647
1644 snac_content = xs_html_tag("details", 1648 snac_content = xs_html_tag("details",
1645 xs_html_attr(cw, NULL), 1649 xs_html_attr(cw, NULL),