refactor: resolve #7139
This commit is contained in:
parent
ebadd7fd3f
commit
91172654e4
76 changed files with 107 additions and 221 deletions
|
|
@ -3,7 +3,6 @@ import { Note } from '../../../models/entities/note';
|
|||
import { User } from '../../../models/entities/user';
|
||||
import { Notes, UserProfiles, NoteReactions } from '../../../models';
|
||||
import { generateMutedUserQuery } from './generate-muted-user-query';
|
||||
import { ensure } from '../../../prelude/ensure';
|
||||
|
||||
// TODO: リアクション、Renote、返信などをしたノートは除外する
|
||||
|
||||
|
|
@ -11,7 +10,7 @@ export async function injectFeatured(timeline: Note[], user?: User | null) {
|
|||
if (timeline.length < 5) return;
|
||||
|
||||
if (user) {
|
||||
const profile = await UserProfiles.findOne(user.id).then(ensure);
|
||||
const profile = await UserProfiles.findOneOrFail(user.id);
|
||||
if (!profile.injectFeaturedNote) return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue