diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index 4eeec563d7..7f9d728976 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -237,7 +237,10 @@ export default class extends Endpoint { // eslint- if (followingChannels.length > 0) { const followingChannelIds = followingChannels.map(x => x.followeeId); - query.andWhere('note.channelId IN (:...followingChannelIds) OR note.channelId IS NULL', { followingChannelIds }); + query.andWhere(new Brackets(qb => { + qb.where('note.channelId IN (:...followingChannelIds)', { followingChannelIds }); + qb.andWhere('note.channelId IS NULL'); + })); } else { query.andWhere('note.channelId IS NULL'); }