mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 09:43:08 +02:00
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:
parent
111863b396
commit
044d3d76e7
1 changed files with 1 additions and 1 deletions
|
@ -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.channel?.isSensitive && !isSelf) return false;
|
||||||
if (note.visibility === 'specified' && (!me || (me.id !== note.userId && !note.visibleUserIds.some(v => v === me.id)))) return false;
|
if (note.visibility === 'specified' && (!me || (me.id !== note.userId && !note.visibleUserIds.some(v => v === me.id)))) return false;
|
||||||
|
|
Loading…
Reference in a new issue