diff options
| author | 2024-05-09 09:31:10 +0200 | |
|---|---|---|
| committer | 2024-05-09 09:31:10 +0200 | |
| commit | cccc5454c259d0d4ca600b3e1165979c352be54f (patch) | |
| tree | 1305ccbed7fab0d5112d7e211dc47f951aac76e4 /mastoapi.c | |
| parent | mastoapi: some search by content tweaks. (diff) | |
| download | snac2-cccc5454c259d0d4ca600b3e1165979c352be54f.tar.gz snac2-cccc5454c259d0d4ca600b3e1165979c352be54f.tar.xz snac2-cccc5454c259d0d4ca600b3e1165979c352be54f.zip | |
Added a maximum results argument to content_search().
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -2260,10 +2260,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 2260 | 2260 | ||
| 2261 | if (xs_is_null(type) || strcmp(type, "statuses") == 0) { | 2261 | if (xs_is_null(type) || strcmp(type, "statuses") == 0) { |
| 2262 | int to = 0; | 2262 | int to = 0; |
| 2263 | xs *tl = content_search(&snac1, q, 1, 0, &to); | 2263 | int cnt = 40; |
| 2264 | xs *tl = content_search(&snac1, q, 1, 0, cnt, &to); | ||
| 2264 | int c = 0; | 2265 | int c = 0; |
| 2265 | char *v; | 2266 | char *v; |
| 2266 | int cnt = 40; | ||
| 2267 | 2267 | ||
| 2268 | while (xs_list_next(tl, &v, &c) && --cnt) { | 2268 | while (xs_list_next(tl, &v, &c) && --cnt) { |
| 2269 | xs *post = NULL; | 2269 | xs *post = NULL; |