diff options
author | default <nobody@localhost> | 2023-11-19 18:34:14 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2023-11-19 18:34:14 +0100 |
commit | 3c6d32334ad03cecb9669cccd820ebc7f5b8877d (patch) | |
tree | a4d00444cfe10d7ce198e9bd392af927542b81e4 /html.c | |
parent | 562bea2cf938d092435d8685050644afba8ce5d9 (diff) |
History can be disabled.
Diffstat (limited to 'html.c')
-rw-r--r-- | html.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1600,7 +1600,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local, s = xs_str_cat(s, "</div>\n"); - if (list && user && local) { + if (list && user && local && xs_type(xs_dict_get(srv_config, "disable_history")) != XSTYPE_TRUE) { xs *s1 = xs_fmt( "<div class=\"snac-history\">\n" "<p class=\"snac-history-title\">%s</p><ul>\n", @@ -2105,6 +2105,9 @@ int html_get_handler(const xs_dict *req, const char *q_path, if (xs_type(xs_dict_get(snac.config, "private")) == XSTYPE_TRUE) return 403; + if (xs_type(xs_dict_get(srv_config, "disable_history")) == XSTYPE_TRUE) + return 403; + xs *l = xs_split(p_path, "/"); char *id = xs_list_get(l, 1); |