mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
History can be disabled.
This commit is contained in:
parent
562bea2cf9
commit
3c6d32334a
1 changed files with 4 additions and 1 deletions
5
html.c
5
html.c
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue