merge: fix file sorting on user notes (#122)

This commit is contained in:
Marie 2023-10-31 18:11:24 +01:00 committed by GitHub
commit c491385f2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,6 +123,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
} }
} }
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;
if (note.visibility === 'followers' && !isFollowing && !isSelf) return false; if (note.visibility === 'followers' && !isFollowing && !isSelf) return false;