commit 4676f8c
default
·
2023-10-08 17:27:07 +0000 UTC
parent 8524ace
The HTML user page does not show an error, only the empty header.
1 files changed,
+7,
-4
M
html.c
M
html.c
+7,
-4
1@@ -1591,7 +1591,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local, int skip, int
2
3 s = xs_str_cat(s, "</div>\n");
4
5- if (user && local) {
6+ if (list && user && local) {
7 xs *s1 = xs_fmt(
8 "<div class=\"snac-history\">\n"
9 "<p class=\"snac-history-title\">%s</p><ul>\n",
10@@ -1959,11 +1959,14 @@ int html_get_handler(const xs_dict *req, const char *q_path,
11 show = atoi(v), cache = 0, save = 0;
12
13 if (p_path == NULL) { /** public timeline **/
14- if (xs_type(xs_dict_get(snac.config, "private")) == XSTYPE_TRUE)
15- return 403;
16-
17 xs *h = xs_str_localtime(0, "%Y-%m.html");
18
19+ if (xs_type(xs_dict_get(snac.config, "private")) == XSTYPE_TRUE) {
20+ *body = html_timeline(&snac, NULL, 1, 0, 0, 0);
21+ *b_size = strlen(*body);
22+ status = 200;
23+ }
24+ else
25 if (cache && history_mtime(&snac, h) > timeline_mtime(&snac)) {
26 snac_debug(&snac, 1, xs_fmt("serving cached local timeline"));
27