Skip to content
Snippets Groups Projects
Unverified Commit 91ef328b authored by syuilo's avatar syuilo
Browse files

「みつける」でミュートしているユーザーが含まれる問題を修正

parent 5a9d9dc4
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ unreleased
----------
* デッキでユーザーを表示したときにタイムラインが残存する問題を修正
* ハイライトでミュートしているユーザーの投稿が含まれる問題を修正
* 「みつける」でミュートしているユーザーが含まれる問題を修正
10.87.5
----------
......
......@@ -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],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment