chore: synchronize visibility checks (#8687)
* reuse single meId parameter * unify code style Use template string to avoid having to use escaped quote marks. * fix: follower only notes are visible to mentioned users This synchronizes the visibility rules with the Notes.isVisibleForMe method from packages/backend/src/models/repositories/note.ts * add comment
This commit is contained in:
@ -136,6 +136,7 @@ async function populateMyReaction(note: Note, meId: User['id'], _hint_?: {
|
||||
|
||||
export const NoteRepository = db.getRepository(Note).extend({
|
||||
async isVisibleForMe(note: Note, meId: User['id'] | null): Promise<boolean> {
|
||||
// This code must always be synchronized with the checks in generateVisibilityQuery.
|
||||
// visibility が specified かつ自分が指定されていなかったら非表示
|
||||
if (note.visibility === 'specified') {
|
||||
if (meId == null) {
|
||||
|
Reference in New Issue
Block a user