From 91e0a59d553b178ef97697f849bfc62388fd94aa Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Sun, 6 Aug 2023 16:42:06 +0900 Subject: [PATCH] fix: cw execution will exclude all notes without cw --- .../backend/src/server/api/endpoints/notes/featured.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index 85ac02fed4..ca79d57c24 100644 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -68,8 +68,11 @@ export default class extends Endpoint { new Brackets(qb => { qb.where('note.text NOT LIKE \'%おはよう%\'') .andWhere('note.text NOT LIKE \'%:ohayo_nirila_misskey:%\'') - .andWhere('note.cw NOT LIKE \'%おはよう%\'') - .andWhere('note.cw NOT LIKE \'%:ohayo_nirila_misskey:%\'') + .andWhere(new Brackets(qb => { + qb.where('note.cw NOT LIKE \'%おはよう%\'') + .andWhere('note.cw NOT LIKE \'%:ohayo_nirila_misskey:%\'') + .orWhere('note.cw IS NULL'); + })) .orWhere('note.fileIds != \'{}\''); }), );