diff --git a/src/server/api/common/generate-replies-query.ts b/src/server/api/common/generate-replies-query.ts index c7ca742e2f..8ebe93f20a 100644 --- a/src/server/api/common/generate-replies-query.ts +++ b/src/server/api/common/generate-replies-query.ts @@ -1,7 +1,7 @@ import { User } from '../../../models/entities/user'; import { Brackets, SelectQueryBuilder } from 'typeorm'; -export function generateRepliesQuery(q: SelectQueryBuilder, me?: User) { +export function generateRepliesQuery(q: SelectQueryBuilder, me?: User | null) { if (me == null) { q.andWhere(new Brackets(qb => { qb .where(`note.replyId IS NULL`) // 返信ではない diff --git a/src/server/api/common/generate-visibility-query.ts b/src/server/api/common/generate-visibility-query.ts index 2807dc99dc..d981b4a613 100644 --- a/src/server/api/common/generate-visibility-query.ts +++ b/src/server/api/common/generate-visibility-query.ts @@ -2,7 +2,7 @@ import { User } from '../../../models/entities/user'; import { Followings } from '../../../models'; import { Brackets, SelectQueryBuilder } from 'typeorm'; -export function generateVisibilityQuery(q: SelectQueryBuilder, me?: User) { +export function generateVisibilityQuery(q: SelectQueryBuilder, me?: User | null) { if (me == null) { q.andWhere(new Brackets(qb => { qb .where(`note.visibility = 'public'`)