remove un-necessary call to isAccessible from shouldRedact
This commit is contained in:
parent
b289a0c091
commit
c9fc153fe2
1 changed files with 1 additions and 7 deletions
|
|
@ -280,7 +280,7 @@ export class NoteVisibilityService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Based on NoteEntityService.hideNote
|
// 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
|
// Never redact our own notes
|
||||||
if (user?.id === note.userId) return false;
|
if (user?.id === note.userId) return false;
|
||||||
|
|
||||||
|
|
@ -300,12 +300,6 @@ export class NoteVisibilityService {
|
||||||
if (hiddenOpt1 || hiddenOpt2) return true;
|
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
|
// Otherwise don't redact
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue