diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-06-05 02:34:57 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-06-05 02:34:57 -0400 |
| commit | 05d7aa0b91525e9029b1e8a638561bf125ca32cb (patch) | |
| tree | d4010119294e5ebfdd89d4c0b9543541a88d2bdd /packages/backend/src/server/api/endpoints/channels | |
| parent | fix performance regression in mentions endpoint (diff) | |
| download | sharkey-05d7aa0b91525e9029b1e8a638561bf125ca32cb.tar.gz sharkey-05d7aa0b91525e9029b1e8a638561bf125ca32cb.tar.bz2 sharkey-05d7aa0b91525e9029b1e8a638561bf125ca32cb.zip | |
additional fixes and cleanup to all note endpoints
Diffstat (limited to 'packages/backend/src/server/api/endpoints/channels')
| -rw-r--r-- | packages/backend/src/server/api/endpoints/channels/timeline.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index b7152130d5..fa5b948eca 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -137,12 +137,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- .innerJoinAndSelect('note.user', 'user') .leftJoinAndSelect('note.reply', 'reply') .leftJoinAndSelect('note.renote', 'renote') - .leftJoinAndSelect('reply.user', 'replyUser', 'replyUser.id = note.replyUserId') - .leftJoinAndSelect('renote.user', 'renoteUser', 'renoteUser.id = note.renoteUserId') - .leftJoinAndSelect('note.channel', 'channel'); + .leftJoinAndSelect('reply.user', 'replyUser') + .leftJoinAndSelect('renote.user', 'renoteUser') + .leftJoinAndSelect('note.channel', 'channel') + .limit(ps.limit); - this.queryService.generateBlockedHostQueryForNote(query); this.queryService.generateVisibilityQuery(query, me); + this.queryService.generateBlockedHostQueryForNote(query); + this.queryService.generateSilencedUserQueryForNotes(query, me); if (me) { this.queryService.generateMutedUserQueryForNotes(query, me); this.queryService.generateBlockedUserQueryForNotes(query, me); @@ -159,6 +161,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- } //#endregion - return await query.limit(ps.limit).getMany(); + return await query.getMany(); } } |