fix(backend): users/notes で 自身の visibility: followers なノートが含まれない問題を修正

This commit is contained in:
syuilo
2023-10-09 08:54:57 +09:00
parent 5601ed0914
commit 457b4cf608
2 changed files with 14 additions and 1 deletions

View File

@@ -114,7 +114,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
noteIds = noteIds.slice(0, ps.limit);
if (noteIds.length > 0) {
const isFollowing = me ? Object.hasOwn(await this.cacheService.userFollowingsCache.fetch(me.id), ps.userId) : false;
const isFollowing = me ? me.id === ps.userId || Object.hasOwn(await this.cacheService.userFollowingsCache.fetch(me.id), ps.userId) : false;
const query = this.notesRepository.createQueryBuilder('note')
.where('note.id IN (:...noteIds)', { noteIds: noteIds })