From cccc5454c259d0d4ca600b3e1165979c352be54f Mon Sep 17 00:00:00 2001 From: default Date: Thu, 9 May 2024 09:31:10 +0200 Subject: Added a maximum results argument to content_search(). --- mastoapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mastoapi.c') diff --git a/mastoapi.c b/mastoapi.c index 253021b..cbc965c 100644 --- a/mastoapi.c +++ b/mastoapi.c @@ -2260,10 +2260,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, if (xs_is_null(type) || strcmp(type, "statuses") == 0) { int to = 0; - xs *tl = content_search(&snac1, q, 1, 0, &to); + int cnt = 40; + xs *tl = content_search(&snac1, q, 1, 0, cnt, &to); int c = 0; char *v; - int cnt = 40; while (xs_list_next(tl, &v, &c) && --cnt) { xs *post = NULL; -- cgit v1.2.3