diff options
| author | Paul Martin <pm@nowster.org.uk> | 2025-01-21 23:26:50 +0000 |
|---|---|---|
| committer | Paul Martin <pm@nowster.org.uk> | 2025-01-21 23:26:50 +0000 |
| commit | e6baf0d45c9b55f0b1532a0069b59ca06ac8fbc1 (patch) | |
| tree | 51e51e34d4be34d86f91452f529982c214972528 /mastoapi.c | |
| parent | 2611c816b01d3999ffcf3b59c0d3592908054950 (diff) | |
When reading timeline in ascending order, return results in descending order
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1453,7 +1453,10 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn xs *st = mastoapi_status(user, msg); if (st != NULL) { - out = xs_list_append(out, st); + if (ascending) + out = xs_list_insert(out, 0, st); + else + out = xs_list_append(out, st); cnt++; } |