From 9fcff1467e0eb4a095373de5f27e10fa8200fa16 Mon Sep 17 00:00:00 2001 From: default Date: Sun, 5 Jan 2025 16:53:30 +0100 Subject: New configuration directive "max_public_entries". --- html.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'html.c') diff --git a/html.c b/html.c index 2cb2365..e8803ab 100644 --- a/html.c +++ b/html.c @@ -3423,7 +3423,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 HTTP_STATUS_FORBIDDEN; - xs *elems = timeline_simple_list(&snac, "public", 0, 20); + int cnt = xs_number_get(xs_dict_get_def(srv_config, "max_public_entries", "20")); + + xs *elems = timeline_simple_list(&snac, "public", 0, cnt); xs *bio = xs_dup(xs_dict_get(snac.config, "bio")); xs *rss_title = xs_fmt("%s (@%s@%s)", -- cgit v1.2.3