remove un-necessary call to isAccessible from shouldRedact

This commit is contained in:
Hazelnoot 2025-08-14 02:36:32 -04:00
parent b289a0c091
commit c9fc153fe2

View file

@ -280,7 +280,7 @@ export class NoteVisibilityService {
}
// Based on NoteEntityService.hideNote
private shouldRedact(note: PopulatedNote, user: PopulatedUser, data: NoteVisibilityData): boolean {
private shouldRedact(note: PopulatedNote, user: PopulatedUser): boolean {
// Never redact our own notes
if (user?.id === note.userId) return false;
@ -300,12 +300,6 @@ export class NoteVisibilityService {
if (hiddenOpt1 || hiddenOpt2) return true;
}
// Redact if inaccessible.
// We have to repeat the check in case note visibility changed in treatVisibility!
if (!this.isAccessible(note, user, data)) {
return true;
}
// Otherwise don't redact
return false;
}