Apparently ancestor order matters in the API

Fixes #235
This commit is contained in:
Andrew Godwin 2022-12-22 03:21:31 +00:00
parent e7c09d6457
commit 3c92aa9c2b

View file

@ -94,7 +94,9 @@ def status_context(request, id: str):
ancestors + descendants, request.identity ancestors + descendants, request.identity
) )
return { return {
"ancestors": [p.to_mastodon_json(interactions=interactions) for p in ancestors], "ancestors": [
p.to_mastodon_json(interactions=interactions) for p in reversed(ancestors)
],
"descendants": [ "descendants": [
p.to_mastodon_json(interactions=interactions) for p in descendants p.to_mastodon_json(interactions=interactions) for p in descendants
], ],