diff options
| author | 2025-07-05 19:11:05 +0200 | |
|---|---|---|
| committer | 2025-07-05 19:11:05 +0200 | |
| commit | 42895f7be2c77b4dd391beecae0652de719d090c (patch) | |
| tree | 44d0281a52400a2cde9118058b33bb4f15d834a6 | |
| parent | Version 2.79 RELEASED. (diff) | |
| download | penes-snac2-42895f7be2c77b4dd391beecae0652de719d090c.tar.gz penes-snac2-42895f7be2c77b4dd391beecae0652de719d090c.tar.xz penes-snac2-42895f7be2c77b4dd391beecae0652de719d090c.zip | |
mastoapi: fixed a bug in mastoapi_timeline().
| -rw-r--r-- | mastoapi.c | 10 |
1 files changed, 7 insertions, 3 deletions
| @@ -1344,9 +1344,9 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn | |||
| 1344 | if ((f = fopen(index_fn, "r")) == NULL) | 1344 | if ((f = fopen(index_fn, "r")) == NULL) |
| 1345 | return out; | 1345 | return out; |
| 1346 | 1346 | ||
| 1347 | const char *max_id = xs_dict_get(args, "max_id"); | 1347 | const char *o_max_id = xs_dict_get(args, "max_id"); |
| 1348 | const char *since_id = xs_dict_get(args, "since_id"); | 1348 | const char *o_since_id = xs_dict_get(args, "since_id"); |
| 1349 | const char *min_id = xs_dict_get(args, "min_id"); /* unsupported old-to-new navigation */ | 1349 | const char *o_min_id = xs_dict_get(args, "min_id"); /* unsupported old-to-new navigation */ |
| 1350 | const char *limit_s = xs_dict_get(args, "limit"); | 1350 | const char *limit_s = xs_dict_get(args, "limit"); |
| 1351 | int (*iterator)(FILE *, char *); | 1351 | int (*iterator)(FILE *, char *); |
| 1352 | int initial_status = 0; | 1352 | int initial_status = 0; |
| @@ -1354,6 +1354,10 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn | |||
| 1354 | int limit = 0; | 1354 | int limit = 0; |
| 1355 | int cnt = 0; | 1355 | int cnt = 0; |
| 1356 | 1356 | ||
| 1357 | xs *max_id = o_max_id ? xs_tolower_i(xs_dup(o_max_id)) : NULL; | ||
| 1358 | xs *since_id = o_since_id ? xs_tolower_i(xs_dup(o_since_id)) : NULL; | ||
| 1359 | xs *min_id = o_min_id ? xs_tolower_i(xs_dup(o_min_id)) : NULL; | ||
| 1360 | |||
| 1357 | if (!xs_is_null(limit_s)) | 1361 | if (!xs_is_null(limit_s)) |
| 1358 | limit = atoi(limit_s); | 1362 | limit = atoi(limit_s); |
| 1359 | 1363 | ||