fix(backend): exclude listing unpublic note when changes visibility

This commit is contained in:
ZerglingGo 2023-12-04 01:18:13 +09:00
parent 29662b7ff4
commit f9d2206c01
No known key found for this signature in database
GPG key ID: 3919613C1147B4BF

View file

@ -124,6 +124,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (noteIds.length > 0) {
const query = this.notesRepository.createQueryBuilder('note')
.where('note.id IN (:...noteIds)', { noteIds: noteIds })
.andWhere('note.visibility = \'public\'')
.innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote')