From fe00cb9ad59ad23580d5022739cca3f3d277ce61 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 20 Feb 2019 22:31:21 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=8F=E3=82=A4=E3=83=A9=E3=82=A4=E3=83=88?= =?UTF-8?q?=E3=81=A7=E3=83=9F=E3=83=A5=E3=83=BC=E3=83=88=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=82=8B=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=AE?= =?UTF-8?q?=E6=8A=95=E7=A8=BF=E3=81=8C=E5=90=AB=E3=81=BE=E3=82=8C=E3=82=8B?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/server/api/endpoints/notes/featured.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c7c9d508a..58e5afe142 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 5d3404f1d6..7a3c2b76ee 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: {