mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(api): 🐛 Fix incorrect ancestor order in note context endpoint
This commit is contained in:
parent
4713d0f93f
commit
6859ab5775
|
|
@ -599,7 +599,9 @@ export class Note {
|
|||
const viewableAncestors = ancestors.filter((ancestor) =>
|
||||
ancestor.isViewableByUser(fetcher),
|
||||
);
|
||||
return viewableAncestors;
|
||||
|
||||
// Reverse the order so that the oldest posts are first
|
||||
return viewableAncestors.toReversed();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -625,6 +627,7 @@ export class Note {
|
|||
const viewableDescendants = descendants.filter((descendant) =>
|
||||
descendant.isViewableByUser(fetcher),
|
||||
);
|
||||
|
||||
return viewableDescendants;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue