replace renotes check with generateExcludedRenotesQueryForNotes in bubble-timeline.ts

This commit is contained in:
Hazelnoot 2025-06-03 15:14:37 -04:00
parent 2258e439af
commit a392865203

View file

@ -100,13 +100,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (!ps.withBots) query.andWhere('user.isBot = FALSE'); if (!ps.withBots) query.andWhere('user.isBot = FALSE');
if (!ps.withRenotes) { if (!ps.withRenotes) {
query.andWhere(new Brackets(qb => qb this.queryService.generateExcludedRenotesQueryForNotes(query);
.orWhere('note.renoteId IS NULL')
.orWhere('note.text IS NOT NULL')
.orWhere('note.cw IS NOT NULL')
.orWhere('note.replyId IS NOT NULL')
.orWhere('note.hasPoll = true')
.orWhere('note.fileIds != \'{}\'')));
} else if (me) { } else if (me) {
this.queryService.generateMutedUserRenotesQueryForNotes(query, me); this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
} }