mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 06:23:09 +02:00
try to fix #118
when fetching notes from Redis, we need to re-check the criteria from the API request, because `userTimelineWithFiles`, `userTimelineWithReplies`, `userTimelineWithChannel` all get merged together, so `noteIds` may well contain notes without attachments…
This commit is contained in:
parent
9de6e0ac48
commit
111863b396
1 changed files with 2 additions and 0 deletions
|
@ -123,6 +123,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
}
|
||||
}
|
||||
|
||||
if (ps.withFiles && !note.fileIds) 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 === 'followers' && !isFollowing && !isSelf) return false;
|
||||
|
|
Loading…
Reference in a new issue