actually fix #118

`note.fileIds` is an array, it's always going to be truthy; we need to
check the length, like a similar `if` does just a few lines above
This commit is contained in:
dakkar 2023-10-31 16:16:39 +00:00
parent 111863b396
commit 044d3d76e7

View File

@ -123,7 +123,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
}
if (ps.withFiles && !note.fileIds) return false;
if (ps.withFiles && note.fileIds.length === 0) return false;
if (note.channel?.isSensitive && !isSelf) return false;
if (note.visibility === 'specified' && (!me || (me.id !== note.userId && !note.visibleUserIds.some(v => v === me.id)))) return false;