fix: withChannelNotesとwithFilesを同時に指定したときの考慮 (#12550)

Co-authored-by: sorairo <sorairo@shiosyakeyakini.info>
This commit is contained in:
shiosyakeyakini 2023-12-03 10:18:28 +09:00 committed by GitHub
parent 5ccd61b1f8
commit 4de4a2e143
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,6 +113,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
redisTimelines, redisTimelines,
useDbFallback: true, useDbFallback: true,
noteFilter: note => { noteFilter: note => {
if (ps.withFiles && note.fileIds.length === 0) {
return false;
}
if (me && isUserRelated(note, userIdsWhoMeMuting, true)) return false; if (me && isUserRelated(note, userIdsWhoMeMuting, true)) return false;
if (note.renoteId) { if (note.renoteId) {