diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c7c9d508..58e5afe14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ChangeLog unreleased ---------- * デッキでユーザーを表示したときにタイムラインが残存する問題を修正 +* ハイライトでミュートしているユーザーの投稿が含まれる問題を修正 10.87.5 ---------- diff --git a/src/server/api/endpoints/notes/featured.ts b/src/server/api/endpoints/notes/featured.ts index 5d3404f1d..7a3c2b76e 100644 --- a/src/server/api/endpoints/notes/featured.ts +++ b/src/server/api/endpoints/notes/featured.ts @@ -2,6 +2,7 @@ import $ from 'cafy'; import Note from '../../../../models/note'; import { packMany } from '../../../../models/note'; import define from '../../define'; +import { getHideUserIds } from '../../common/get-hide-users'; export const meta = { desc: { @@ -25,6 +26,8 @@ export const meta = { export default define(meta, (ps, user) => new Promise(async (res, rej) => { const day = 1000 * 60 * 60 * 24 * 2; + const hideUserIds = await getHideUserIds(user); + const notes = await Note .find({ createdAt: { @@ -32,7 +35,8 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { }, deletedAt: null, visibility: { $in: ['public', 'home'] }, - '_user.host': null + '_user.host': null, + ...(hideUserIds && hideUserIds.length > 0 ? { userId: { $nin: hideUserIds } } : {}) }, { limit: ps.limit, sort: {