diff --git a/fedi2html.sh b/fedi2html.sh index 9e7d0ea..53e9adf 100755 --- a/fedi2html.sh +++ b/fedi2html.sh @@ -148,7 +148,10 @@ media_attachments() { # Pass a post’s context JSON along stdin; out comes the response_data in JSON. # fetch_post_context $url | context_to_responses context_to_responses() { - jq -cr '.descendants[]' + jq '.descendants' \ + | jq 'sort_by(.created_at)' \ + | jq 'reverse' \ + | jq -cr '.[]' }