diff options
| author | Hazel K <acomputerdog@gmail.com> | 2024-09-30 13:29:15 -0400 |
|---|---|---|
| committer | Hazel K <acomputerdog@gmail.com> | 2024-09-30 13:29:15 -0400 |
| commit | acc0c7867fcc44650f9ada06286f35a103ceec1e (patch) | |
| tree | 78ad4b1d0e4085c7c0e319383c30dd1f7f1be5a9 /packages/backend/src/core/NoteDeleteService.ts | |
| parent | fix more copyright headers (diff) | |
| download | sharkey-acc0c7867fcc44650f9ada06286f35a103ceec1e.tar.gz sharkey-acc0c7867fcc44650f9ada06286f35a103ceec1e.tar.bz2 sharkey-acc0c7867fcc44650f9ada06286f35a103ceec1e.zip | |
exclude boosts from featured timeline
Diffstat (limited to 'packages/backend/src/core/NoteDeleteService.ts')
| -rw-r--r-- | packages/backend/src/core/NoteDeleteService.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/packages/backend/src/core/NoteDeleteService.ts b/packages/backend/src/core/NoteDeleteService.ts index 898e164966..de753a3aa2 100644 --- a/packages/backend/src/core/NoteDeleteService.ts +++ b/packages/backend/src/core/NoteDeleteService.ts @@ -240,14 +240,25 @@ export class NoteDeleteService { // If it's a DM, then it can't possibly be the latest note so we can safely skip this. if (note.visibility === 'specified') return; - // Find the newest remaining note for the user + // Find the newest remaining note for the user. + // We exclude DMs and pure renotes. const nextLatest = await this.notesRepository - .createQueryBuilder() + .createQueryBuilder('note') .select() .where({ userId: note.userId, visibility: Not('specified'), }) + .andWhere(` + ( + note."renoteId" IS NULL + OR note.text IS NOT NULL + OR note.cw IS NOT NULL + OR note."replyId" IS NOT NULL + OR note."hasPoll" + OR note."fileIds" != '{}' + ) + `) .orderBy({ id: 'DESC' }) .getOne(); if (!nextLatest) return; |