summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar default2025-01-05 16:53:30 +0100
committerGravatar default2025-01-05 16:53:30 +0100
commit9fcff1467e0eb4a095373de5f27e10fa8200fa16 (patch)
tree15fca66ed82433ab4406b861590c0c454ab296eb /html.c
parentUpdated RELEASE_NOTES. (diff)
downloadsnac2-9fcff1467e0eb4a095373de5f27e10fa8200fa16.tar.gz
snac2-9fcff1467e0eb4a095373de5f27e10fa8200fa16.tar.xz
snac2-9fcff1467e0eb4a095373de5f27e10fa8200fa16.zip
New configuration directive "max_public_entries".
Diffstat (limited to 'html.c')
-rw-r--r--html.c4
1 files changed, 3 insertions, 1 deletions
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,
3423 if (xs_type(xs_dict_get(snac.config, "private")) == XSTYPE_TRUE) 3423 if (xs_type(xs_dict_get(snac.config, "private")) == XSTYPE_TRUE)
3424 return HTTP_STATUS_FORBIDDEN; 3424 return HTTP_STATUS_FORBIDDEN;
3425 3425
3426 xs *elems = timeline_simple_list(&snac, "public", 0, 20); 3426 int cnt = xs_number_get(xs_dict_get_def(srv_config, "max_public_entries", "20"));
3427
3428 xs *elems = timeline_simple_list(&snac, "public", 0, cnt);
3427 xs *bio = xs_dup(xs_dict_get(snac.config, "bio")); 3429 xs *bio = xs_dup(xs_dict_get(snac.config, "bio"));
3428 3430
3429 xs *rss_title = xs_fmt("%s (@%s@%s)", 3431 xs *rss_title = xs_fmt("%s (@%s@%s)",