diff options
| author | Mar0xy <marie@kaifa.ch> | 2023-11-04 14:32:28 +0100 |
|---|---|---|
| committer | Mar0xy <marie@kaifa.ch> | 2023-11-04 14:32:28 +0100 |
| commit | 647e76ab36ee99d5c3e6da95cd4a941d6cbc8114 (patch) | |
| tree | 01039aa66e053c1da9cf9d04a9474b1b7756daf3 /packages/backend/src/server/api | |
| parent | upd: change misskey to sharkey, msky to shonk (diff) | |
| parent | New Crowdin updates (#12241) (diff) | |
| download | sharkey-647e76ab36ee99d5c3e6da95cd4a941d6cbc8114.tar.gz sharkey-647e76ab36ee99d5c3e6da95cd4a941d6cbc8114.tar.bz2 sharkey-647e76ab36ee99d5c3e6da95cd4a941d6cbc8114.zip | |
merge: upstream
Diffstat (limited to 'packages/backend/src/server/api')
| -rw-r--r-- | packages/backend/src/server/api/endpoints/notes/global-timeline.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts index 5827577543..844de80268 100644 --- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts @@ -98,6 +98,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- } if (!ps.withBots) query.andWhere('user.isBot = FALSE'); + + if (ps.withRenotes === false) { + query.andWhere(new Brackets(qb => { + qb.where('note.renoteId IS NULL'); + qb.orWhere(new Brackets(qb => { + qb.where('note.text IS NOT NULL'); + qb.orWhere('note.fileIds != \'{}\''); + })); + })); + } //#endregion let timeline = await query.limit(ps.limit).getMany(); |