From e6baf0d45c9b55f0b1532a0069b59ca06ac8fbc1 Mon Sep 17 00:00:00 2001 From: Paul Martin Date: Tue, 21 Jan 2025 23:26:50 +0000 Subject: When reading timeline in ascending order, return results in descending order --- mastoapi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mastoapi.c') diff --git a/mastoapi.c b/mastoapi.c index 3250a20..54b4333 100644 --- a/mastoapi.c +++ b/mastoapi.c @@ -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++; } -- cgit v1.2.3