From 91ef328b6baab4d241668bc04548ccbcf106a628 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 20 Feb 2019 22:34:52 +0900 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=E3=81=BF=E3=81=A4=E3=81=91=E3=82=8B?= =?UTF-8?q?=E3=80=8D=E3=81=A7=E3=83=9F=E3=83=A5=E3=83=BC=E3=83=88=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=82=8B=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E3=81=8C=E5=90=AB=E3=81=BE=E3=82=8C=E3=82=8B=E5=95=8F=E9=A1=8C?= =?UTF-8?q?=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/users.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58e5afe142..e88dd8b201 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ unreleased ---------- * デッキでユーザーを表示したときにタイムラインが残存する問題を修正 * ハイライトでミュートしているユーザーの投稿が含まれる問題を修正 +* 「みつける」でミュートしているユーザーが含まれる問題を修正 10.87.5 ---------- diff --git a/src/server/api/endpoints/users.ts b/src/server/api/endpoints/users.ts index 8e83dca350..fd8cc6413e 100644 --- a/src/server/api/endpoints/users.ts +++ b/src/server/api/endpoints/users.ts @@ -2,6 +2,7 @@ import $ from 'cafy'; import User, { pack } from '../../../models/user'; import define from '../define'; import { fallback } from '../../../prelude/symbol'; +import { getHideUserIds } from '../common/get-hide-users'; const nonnull = { $ne: null as any }; @@ -86,12 +87,15 @@ const sort: any = { // < https://github.com/Microsoft/TypeScript/issues/1863 }; export default define(meta, (ps, me) => new Promise(async (res, rej) => { + const hideUserIds = await getHideUserIds(me); + const users = await User .find({ $and: [ state[ps.state] || state[fallback], origin[ps.origin] || origin[fallback] - ] + ], + ...(hideUserIds && hideUserIds.length > 0 ? { _id: { $nin: hideUserIds } } : {}) }, { limit: ps.limit, sort: sort[ps.sort] || sort[fallback],