From 71bf3dc1d9bc62e32b37506892e1cc3f2690cf06 Mon Sep 17 00:00:00 2001 From: Namekuji Date: Sat, 12 Aug 2023 05:17:34 -0400 Subject: [PATCH] fix: execute renotes query --- .../backend/src/server/api/endpoints/notes/renotes.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts index bda01203e8..fe0e7bfea5 100644 --- a/packages/backend/src/server/api/endpoints/notes/renotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts @@ -106,7 +106,13 @@ export default define(meta, paramDef, async (ps, user) => { let untilDate: number | undefined; while (foundPacked.length < ps.limit) { const foundNotes = ( - await execNotePaginationQuery({ ...ps, untilDate }, filter, 1) + await execNotePaginationQuery( + "renotes", + { ...ps, untilDate }, + filter, + user?.id, + 1, + ) ).slice(0, ps.limit * 1.5); // Some may filtered out by Notes.packMany, thus we take more than ps.limit. foundPacked.push( ...(await Notes.packMany(foundNotes, user, { scyllaNote: true })),