[backend/masto-client] Apply limit to note ancestors/descendants queries
This commit is contained in:
parent
8745f72ea7
commit
e61736b588
1 changed files with 2 additions and 0 deletions
|
@ -53,12 +53,14 @@ public class StatusController(DatabaseContext db, NoteRenderer noteRenderer, Not
|
|||
throw GracefulException.RecordNotFound();
|
||||
|
||||
var ancestors = await db.NoteAncestors(id, maxAncestors)
|
||||
.Take(maxAncestors)
|
||||
.IncludeCommonProperties()
|
||||
.EnsureVisibleFor(user)
|
||||
.PrecomputeVisibilities(user)
|
||||
.RenderAllForMastodonAsync(noteRenderer);
|
||||
|
||||
var descendants = await db.NoteDescendants(id, maxDepth, maxDescendants)
|
||||
.Take(maxDescendants)
|
||||
.IncludeCommonProperties()
|
||||
.EnsureVisibleFor(user)
|
||||
.PrecomputeVisibilities(user)
|
||||
|
|
Loading…
Add table
Reference in a new issue