diff options
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 16 |
1 files changed, 13 insertions, 3 deletions
| @@ -2168,6 +2168,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only, | |||
| 2168 | xs_list *p = (xs_list *)list; | 2168 | xs_list *p = (xs_list *)list; |
| 2169 | const char *v; | 2169 | const char *v; |
| 2170 | double t = ftime(); | 2170 | double t = ftime(); |
| 2171 | int hide_children = xs_is_true(xs_dict_get(srv_config, "strict_public_timelines")); | ||
| 2171 | 2172 | ||
| 2172 | xs *desc = NULL; | 2173 | xs *desc = NULL; |
| 2173 | xs *alternate = NULL; | 2174 | xs *alternate = NULL; |
| @@ -2329,7 +2330,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only, | |||
| 2329 | } | 2330 | } |
| 2330 | } | 2331 | } |
| 2331 | 2332 | ||
| 2332 | xs_html *entry = html_entry(user, msg, read_only, 0, v, user ? 0 : 1); | 2333 | xs_html *entry = html_entry(user, msg, read_only, 0, v, (user && !hide_children) ? 0 : 1); |
| 2333 | 2334 | ||
| 2334 | if (entry != NULL) | 2335 | if (entry != NULL) |
| 2335 | xs_html_add(posts, | 2336 | xs_html_add(posts, |
| @@ -2844,8 +2845,17 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 2844 | xs_dict_get(req, "if-none-match"), etag); | 2845 | xs_dict_get(req, "if-none-match"), etag); |
| 2845 | } | 2846 | } |
| 2846 | else { | 2847 | else { |
| 2847 | xs *list = timeline_list(&snac, "public", skip, show); | 2848 | xs *list = NULL; |
| 2848 | xs *next = timeline_list(&snac, "public", skip + show, 1); | 2849 | xs *next = NULL; |
| 2850 | |||
| 2851 | if (xs_is_true(xs_dict_get(srv_config, "strict_public_timelines"))) { | ||
| 2852 | list = timeline_simple_list(&snac, "public", skip, show); | ||
| 2853 | next = timeline_simple_list(&snac, "public", skip + show, 1); | ||
| 2854 | } | ||
| 2855 | else { | ||
| 2856 | list = timeline_list(&snac, "public", skip, show); | ||
| 2857 | next = timeline_list(&snac, "public", skip + show, 1); | ||
| 2858 | } | ||
| 2849 | 2859 | ||
| 2850 | xs *pins = pinned_list(&snac); | 2860 | xs *pins = pinned_list(&snac); |
| 2851 | pins = xs_list_cat(pins, list); | 2861 | pins = xs_list_cat(pins, list); |